29 if (avctx->
width & 1) {
52 int buf_size,
void *
data)
55 int aligned_width = ((avctx->
width + 47) / 48) * 48;
56 int stride = aligned_width * 8 / 3;
58 const uint16_t *y = (
const uint16_t*)pic->
data[0];
59 const uint16_t *u = (
const uint16_t*)pic->
data[1];
60 const uint16_t *
v = (
const uint16_t*)pic->
data[2];
64 if (buf_size < aligned_width * avctx->
height * 8 / 3) {
69 #define CLIP(v) av_clip(v, 4, 1019)
71 #define WRITE_PIXELS(a, b, c) \
74 val |= (CLIP(*b++) << 10) | \
76 bytestream_put_le32(&p, val); \
79 for (h = 0; h < avctx->
height; h++) {
81 for (w = 0; w < avctx->
width - 5; w += 6) {
87 if (w < avctx->
width - 1) {
91 if (w == avctx->
width - 2)
92 bytestream_put_le32(&p, val);
94 if (w < avctx->
width - 3) {
95 val |= (
CLIP(*u++) << 10) | (
CLIP(*y++) << 20);
96 bytestream_put_le32(&p, val);
98 val =
CLIP(*v++) | (
CLIP(*y++) << 10);
99 bytestream_put_le32(&p, val);
103 memset(p, 0, pdst - p);