25 #define CLIP(v, depth) av_clip(v, 1<<(depth-8), ((1<<depth)-(1<<(depth-8))-1)) 26 #define WRITE_PIXELS(a, b, c, depth) \ 28 val = CLIP(*a++, depth) << (10-depth); \ 29 val |= (CLIP(*b++, depth) << (20-depth)) | \ 30 (CLIP(*c++, depth) << (30-depth)); \ 39 int aligned_width = ((avctx->width + 47) / 48) * 48;
40 int stride = aligned_width * 8 / 3;
41 int line_padding = stride - ((avctx->width * 8 + 11) / 12) * 4;
43 const TYPE *y = (
const TYPE *)pic->data[0];
44 const TYPE *
u = (
const TYPE *)pic->data[1];
45 const TYPE *v = (
const TYPE *)pic->data[2];
46 const int sample_size = 6 * s->RENAME(sample_factor);
47 const int sample_w = avctx->width / sample_size;
49 for (h = 0; h < avctx->height; h++) {
51 w = sample_w * sample_size;
52 s->RENAME(pack_line)(y,
u, v, dst,
w);
57 dst += sample_w * 16 * s->RENAME(sample_factor);
59 for (; w < avctx->width - 5; w += 6) {
65 if (w < avctx->
width - 1) {
69 if (w == avctx->width - 2) {
74 if (w < avctx->
width - 3) {
84 memset(dst, 0, line_padding);
This structure describes decoded (raw) audio or video data.
#define u(width, name, range_min, range_max)
static void RENAME() v210_enc(AVCodecContext *avctx, uint8_t *dst, const AVFrame *pic)
main external API structure.
#define WRITE_PIXELS(a, b, c, depth)
common internal api header.
static double val(void *priv, double ch)