[FFmpeg-cvslog] r16698 - in trunk: libavformat/gxfenc.c tests/libav.regression.ref

bcoudurier subversion
Tue Jan 20 10:25:50 CET 2009


Author: bcoudurier
Date: Tue Jan 20 10:25:50 2009
New Revision: 16698

Log:
set correct value for starting line

Modified:
   trunk/libavformat/gxfenc.c
   trunk/tests/libav.regression.ref

Modified: trunk/libavformat/gxfenc.c
==============================================================================
--- trunk/libavformat/gxfenc.c	Tue Jan 20 10:14:46 2009	(r16697)
+++ trunk/libavformat/gxfenc.c	Tue Jan 20 10:25:50 2009	(r16698)
@@ -169,7 +169,7 @@ static void gxf_write_packet_header(Byte
 static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx)
 {
     char buffer[1024];
-    int size;
+    int size, starting_line;
 
     if (ctx->iframes) {
         ctx->p_per_gop = ctx->pframes / ctx->iframes;
@@ -182,11 +182,18 @@ static int gxf_write_mpeg_auxiliary(Byte
         if (ctx->b_per_gop > 9)
             ctx->b_per_gop = 9; /* ensure value won't take more than one char */
     }
+    if (ctx->codec->height == 512 || ctx->codec->height == 608)
+        starting_line = 7; // VBI
+    else if (ctx->codec->height == 480)
+        starting_line = 20;
+    else
+        starting_line = 23; // default PAL
+
     size = snprintf(buffer, 1024, "Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\n"
-                    "Pix 0\nCf %d\nCg %d\nSl 7\nnl16 %d\nVi 1\nf1 1\n",
+                    "Pix 0\nCf %d\nCg %d\nSl %d\nnl16 %d\nVi 1\nf1 1\n",
                     (float)ctx->codec->bit_rate, ctx->p_per_gop, ctx->b_per_gop,
                     ctx->codec->pix_fmt == PIX_FMT_YUV422P ? 2 : 1, ctx->first_gop_closed == 1,
-                    ctx->codec->height / 16);
+                    starting_line, ctx->codec->height / 16);
     put_byte(pb, TRACK_MPG_AUX);
     put_byte(pb, size + 1);
     put_buffer(pb, (uint8_t *)buffer, size + 1);

Modified: trunk/tests/libav.regression.ref
==============================================================================
--- trunk/tests/libav.regression.ref	Tue Jan 20 10:14:46 2009	(r16697)
+++ trunk/tests/libav.regression.ref	Tue Jan 20 10:25:50 2009	(r16698)
@@ -27,8 +27,8 @@ af78858062599fcbba049e4a02588a15 *./test
 913b6199765b1dcba196706574621c2f *./tests/data/b-libav.dv
 3600000 ./tests/data/b-libav.dv
 ./tests/data/b-libav.dv CRC=0x7787e173
-a8d66ca88df1f6ba7806f11224d03adc *./tests/data/b-libav.gxf
-805992 ./tests/data/b-libav.gxf
+ae41914d985979a7f28a286c3689fae1 *./tests/data/b-libav.gxf
+805996 ./tests/data/b-libav.gxf
 ./tests/data/b-libav.gxf CRC=0x9c06676e
 66a6584f9e83e8ea3af822a3ba71fbbe *./tests/data/b-libav.nut
 329264 ./tests/data/b-libav.nut




More information about the ffmpeg-cvslog mailing list