Commit f2490ba9 authored by michael's avatar michael

slif aka "SoftLab MPEG-2 I-frames Codec" support.

Fliping one bit still is popular it seems as a means to create a new codec.
fixes issue1469.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20679 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 027496b3
...@@ -1694,6 +1694,9 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, ...@@ -1694,6 +1694,9 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
s->mb_x=0; s->mb_x=0;
if(mb_y==0 && s->codec_tag == AV_RL32("SLIF")){
skip_bits1(&s->gb);
}else{
for(;;) { for(;;) {
int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2); int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2);
if (code < 0){ if (code < 0){
...@@ -1710,6 +1713,8 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, ...@@ -1710,6 +1713,8 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
break; break;
} }
} }
}
if(s->mb_x >= (unsigned)s->mb_width){ if(s->mb_x >= (unsigned)s->mb_width){
av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n"); av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n");
return -1; return -1;
......
...@@ -116,6 +116,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { ...@@ -116,6 +116,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{ CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') }, { CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') },
{ CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') }, { CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') },
{ CODEC_ID_MPEG2VIDEO, MKTAG('L', 'M', 'P', '2') }, /* Lead MPEG2 in avi */ { CODEC_ID_MPEG2VIDEO, MKTAG('L', 'M', 'P', '2') }, /* Lead MPEG2 in avi */
{ CODEC_ID_MPEG2VIDEO, MKTAG('s', 'l', 'i', 'f') },
{ CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') }, { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
{ CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') }, { CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') },
{ CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') }, { CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment