aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sp5xdec.c
diff options
context:
space:
mode:
authorVladimir Voroshilov <voroshil@gmail.com>2007-09-29 15:20:22 +0000
committerVitor Sessak <vitor1001@gmail.com>2007-09-29 15:20:22 +0000
commit8787d8377f8024f43b732f099a4ce36b9f1b717e (patch)
tree94753eb5f837977ce2f885e9cd194f08430d46fc /libavcodec/sp5xdec.c
parent55ffe9df2acfc06236b139c5226d202f3cc5ef59 (diff)
downloadffmpeg-8787d8377f8024f43b732f099a4ce36b9f1b717e.tar.gz
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/sp5xdec.c')
-rw-r--r--libavcodec/sp5xdec.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index 2234afa697..ada46ca353 100644
--- a/libavcodec/sp5xdec.c
+++ b/libavcodec/sp5xdec.c
@@ -72,6 +72,10 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
memcpy(recoded+j, &sp5x_data_sos[0], sizeof(sp5x_data_sos));
j += sizeof(sp5x_data_sos);
+ if(avctx->codec_id==CODEC_ID_AMV)
+ for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
+ recoded[j++] = buf[i];
+ else
for (i = 14; i < buf_size && j < buf_size+1024-2; i++)
{
recoded[j++] = buf[i];
@@ -194,3 +198,15 @@ AVCodec sp5x_decoder = {
CODEC_CAP_DR1,
NULL
};
+
+AVCodec amv_decoder = {
+ "amv",
+ CODEC_TYPE_VIDEO,
+ CODEC_ID_AMV,
+ sizeof(MJpegDecodeContext),
+ ff_mjpeg_decode_init,
+ NULL,
+ ff_mjpeg_decode_end,
+ sp5x_decode_frame,
+ CODEC_CAP_DR1
+};