[FFmpeg-cvslog] avcodec/mjpegdec: parse adobe_transform

Michael Niedermayer git at videolan.org
Thu Feb 27 20:25:53 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Feb 27 20:02:20 2014 +0100| [681e72a668abecea4bb34cdb8c7d5d045147a3d9] | committer: Michael Niedermayer

avcodec/mjpegdec: parse adobe_transform

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

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

 libavcodec/mjpegdec.c |    6 +++---
 libavcodec/mjpegdec.h |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 22a1067..3469f70 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1515,12 +1515,12 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
     }
 
     if (id == AV_RB32("Adob") && (get_bits(&s->gb, 8) == 'e')) {
-        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
-            av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found\n");
         skip_bits(&s->gb, 16); /* version */
         skip_bits(&s->gb, 16); /* flags0 */
         skip_bits(&s->gb, 16); /* flags1 */
-        skip_bits(&s->gb,  8); /* transform */
+        s->adobe_transform = get_bits(&s->gb,  8);
+        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
+            av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found, transform=%d\n", s->adobe_transform);
         len -= 7;
         goto out;
     }
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index 1317404..77bbfed 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -69,6 +69,7 @@ typedef struct MJpegDecodeContext {
     int bits;           /* bits per component */
     int colr;
     int xfrm;
+    int adobe_transform;
 
     int maxval;
     int near;         ///< near lossless bound (si 0 for lossless)



More information about the ffmpeg-cvslog mailing list