changeset 1721:8158e66f1f75 libavcodec

SVCD scan offset stuff
author michael
date Sun, 04 Jan 2004 00:23:14 +0000
parents 96a86bd1e0d5
children 7e040c2a86e4
files avcodec.h mpeg12.c mpeg12data.h
diffstat 3 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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; 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 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;
 
--- 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,
+};