[FFmpeg-cvslog] mjpegdec: parse app-colr

Michael Niedermayer git at videolan.org
Thu Jul 11 16:37:11 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jul 11 16:07:00 2013 +0200| [7afa68d37df9c17c5ead6eb3e35348624c717e51] | committer: Michael Niedermayer

mjpegdec: parse app-colr

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7afa68d37df9c17c5ead6eb3e35348624c717e51
---

 libavcodec/mjpegdec.c |    7 +++++++
 libavcodec/mjpegdec.h |    1 +
 2 files changed, 8 insertions(+)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6a362af..a4a9650 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1462,6 +1462,13 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
         len -= 9;
         goto out;
     }
+    if (id == AV_RL32("colr") && len > 0) {
+        s->colr = get_bits(&s->gb, 8);
+        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
+            av_log(s->avctx, AV_LOG_INFO, "COLR %d\n", s->colr);
+        len --;
+        goto out;
+    }
 
     /* Apple MJPEG-A */
     if ((s->start_code == APP1) && (len > (0x28 - 8))) {
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index 31b1fc1..6f82706 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -65,6 +65,7 @@ typedef struct MJpegDecodeContext {
     int rct;            /* standard rct */
     int pegasus_rct;    /* pegasus reversible colorspace transform */
     int bits;           /* bits per component */
+    int colr;
 
     int maxval;
     int near;         ///< near lossless bound (si 0 for lossless)



More information about the ffmpeg-cvslog mailing list