diff options
author | Vladimir Voroshilov <voroshil@gmail.com> | 2007-09-29 19:20:22 +0400 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2007-09-29 19:20:22 +0400 |
commit | 8787d8377f8024f43b732f099a4ce36b9f1b717e (patch) | |
tree | 94753eb5f837977ce2f885e9cd194f08430d46fc /libavcodec/mjpegdec.c | |
parent | 55ffe9df2acfc06236b139c5226d202f3cc5ef59 (diff) |
AMV video decoder.
Patch by Vladimir Voroshilov (voroshil - gmail - com)
Originally committed as revision 10617 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 7dc0616a8f..d1d81d3493 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -669,6 +669,11 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int ss, i int c = s->comp_index[i]; data[c] = s->picture.data[c]; linesize[c]=s->linesize[c]; + if(s->avctx->codec->id==CODEC_ID_AMV) { + //picture should be flipped upside-down for this codec + data[c] += (linesize[c] * (s->v_scount[i] * 8 * s->mb_height - 1)); + linesize[c] *= -1; + } } for(mb_y = 0; mb_y < s->mb_height; mb_y++) { |