diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-01-04 00:23:14 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-01-04 00:23:14 +0000 |
commit | baaf3f467b850e534cce11f556a48df09f4b666d (patch) | |
tree | 2dd4814990cc8eb1a84789efc1d4863e801484b7 /libavcodec | |
parent | c953e7976ec71c007bdc0aa0316398541eb260aa (diff) |
SVCD scan offset stuff
Originally committed as revision 2660 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 1 | ||||
-rw-r--r-- | libavcodec/mpeg12.c | 10 | ||||
-rw-r--r-- | libavcodec/mpeg12data.h | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3a27a9cd3f..55c9376326 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -267,6 +267,7 @@ static const __attribute__((unused)) int Motion_Est_QTab[] = #define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000 #define CODEC_FLAG_INTERLACED_ME 0x20000000 ///< interlaced motion estimation +#define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< will reserve space for SVCD scan offset user data /* Unsupported options : * Syntax Arithmetic coding (SAC) * Reference Picture Selection diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index bd42790978..b902fd86ee 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -473,6 +473,14 @@ void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) put_bits(&s->pb, 1, s->progressive_frame); put_bits(&s->pb, 1, 0); //composite_display_flag } + if(s->flags & CODEC_FLAG_SVCD_SCAN_OFFSET){ + int i; + + put_header(s, USER_START_CODE); + for(i=0; i<sizeof(svcd_scan_offset_placeholder); i++){ + put_bits(&s->pb, 8, svcd_scan_offset_placeholder[i]); + } + } s->mb_y=0; ff_mpeg1_encode_slice_header(s); @@ -1809,7 +1817,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, static void mpeg_decode_sequence_extension(MpegEncContext *s) { int horiz_size_ext, vert_size_ext; - int bit_rate_ext, vbv_buf_ext; + int bit_rate_ext; int frame_rate_ext_n, frame_rate_ext_d; int level, profile; diff --git a/libavcodec/mpeg12data.h b/libavcodec/mpeg12data.h index 70d23dfb9b..42b3d49a1f 100644 --- a/libavcodec/mpeg12data.h +++ b/libavcodec/mpeg12data.h @@ -433,3 +433,10 @@ static const AVRational mpeg2_aspect[16]={ {0,1}, }; +static const uint8_t svcd_scan_offset_placeholder[14]={ + 0x10, 0x0E, + 0x00, 0x80, 0x81, + 0x00, 0x80, 0x81, + 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, +}; |