From efb0c399caa3be581a6c605cefd35f7560f3d740 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 1 Apr 2007 14:28:48 +0000 Subject: support for the THP game format by Marco Gerards, mgerards xs4all nl Originally committed as revision 8587 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mjpeg.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libavcodec/mjpeg.c') diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index ed6016f939..a2362df9dc 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -2044,6 +2044,8 @@ static int mjpeg_decode_frame(AVCodecContext *avctx, uint8_t x = *(src++); *(dst++) = x; + if (avctx->codec_id != CODEC_ID_THP) + { if (x == 0xff) { while(srcgb, s->buffer, (dst - s->buffer)*8); @@ -2583,6 +2586,19 @@ AVCodec mjpeg_decoder = { NULL }; +AVCodec thp_decoder = { + "thp", + CODEC_TYPE_VIDEO, + CODEC_ID_THP, + sizeof(MJpegDecodeContext), + mjpeg_decode_init, + NULL, + mjpeg_decode_end, + mjpeg_decode_frame, + CODEC_CAP_DR1, + NULL +}; + AVCodec mjpegb_decoder = { "mjpegb", CODEC_TYPE_VIDEO, -- cgit v1.2.1