[FFmpeg-devel] [PATCH 2/2] Write DPX according to provided test files

Georg Lippitsch georg.lippitsch at gmx.at
Thu Oct 4 19:48:49 CEST 2012


---
 libavcodec/dpxenc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index 451b7b9..f5f5f32 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -154,8 +154,9 @@ static void encode_gbrp12(AVCodecContext *avctx, const AVPicture *pic, uint16_t
     int x, y, i;
     for (y = 0; y < avctx->height; y++) {
         for (x = 0; x < avctx->width; x++) {
-            for (i = 0; i < 3; i++)
-                *dst++ = *(src[i] + x);
+                *dst++ = *(src[2] + x) << 4;
+                *dst++ = *(src[0] + x) << 4;
+                *dst++ = *(src[1] + x) << 4;
         }
         for (i = 0; i < 3; i++)
             src[i] += pic->linesize[i]/2;
-- 
1.7.7



More information about the ffmpeg-devel mailing list