[FFmpeg-cvslog] r20679 - in trunk: libavcodec/mpeg12.c libavformat/riff.c

michael subversion
Tue Dec 1 03:07:46 CET 2009


Author: michael
Date: Tue Dec  1 03:07:46 2009
New Revision: 20679

Log:
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.

Modified:
   trunk/libavcodec/mpeg12.c
   trunk/libavformat/riff.c

Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c	Tue Dec  1 02:01:37 2009	(r20678)
+++ trunk/libavcodec/mpeg12.c	Tue Dec  1 03:07:46 2009	(r20679)
@@ -1694,6 +1694,9 @@ static int mpeg_decode_slice(Mpeg1Contex
 
     s->mb_x=0;
 
+    if(mb_y==0 && s->codec_tag == AV_RL32("SLIF")){
+        skip_bits1(&s->gb);
+    }else{
     for(;;) {
         int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2);
         if (code < 0){
@@ -1710,6 +1713,8 @@ static int mpeg_decode_slice(Mpeg1Contex
             break;
         }
     }
+    }
+
     if(s->mb_x >= (unsigned)s->mb_width){
         av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n");
         return -1;

Modified: trunk/libavformat/riff.c
==============================================================================
--- trunk/libavformat/riff.c	Tue Dec  1 02:01:37 2009	(r20678)
+++ trunk/libavformat/riff.c	Tue Dec  1 03:07:46 2009	(r20679)
@@ -116,6 +116,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { CODEC_ID_MPEG2VIDEO,   MKTAG('D', 'V', 'R', ' ') },
     { CODEC_ID_MPEG2VIDEO,   MKTAG('M', 'M', 'E', 'S') },
     { 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('L', 'J', 'P', 'G') },
     { CODEC_ID_MJPEG,        MKTAG('d', 'm', 'b', '1') },



More information about the ffmpeg-cvslog mailing list