# HG changeset patch # User michael # Date 1073175794 0 # Node ID 8158e66f1f75583b3868209c00d5063d30ec5c16 # Parent 96a86bd1e0d581f11b377e4d1338b4216c0a578c SVCD scan offset stuff diff -r 96a86bd1e0d5 -r 8158e66f1f75 avcodec.h --- a/avcodec.h Sat Jan 03 20:14:45 2004 +0000 +++ b/avcodec.h Sun Jan 04 00:23:14 2004 +0000 @@ -267,6 +267,7 @@ #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 -r 96a86bd1e0d5 -r 8158e66f1f75 mpeg12.c --- a/mpeg12.c Sat Jan 03 20:14:45 2004 +0000 +++ b/mpeg12.c Sun Jan 04 00:23:14 2004 +0000 @@ -473,6 +473,14 @@ 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; ipb, 8, svcd_scan_offset_placeholder[i]); + } + } s->mb_y=0; ff_mpeg1_encode_slice_header(s); @@ -1809,7 +1817,7 @@ 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 -r 96a86bd1e0d5 -r 8158e66f1f75 mpeg12data.h --- a/mpeg12data.h Sat Jan 03 20:14:45 2004 +0000 +++ b/mpeg12data.h Sun Jan 04 00:23:14 2004 +0000 @@ -433,3 +433,10 @@ {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, +};