changeset 10195:82ce5ee72165 libavcodec

Allow encoding frames with more than 2800 lines. Patch by Martin Fiedler, martin fiedler gmx net
author cehoyos
date Sun, 20 Sep 2009 14:08:44 +0000
parents 5b05416fcb6b
children 9dcd906bd334
files mpeg12enc.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12enc.c	Sat Sep 19 11:42:41 2009 +0000
+++ b/mpeg12enc.c	Sun Sep 20 14:08:44 2009 +0000
@@ -327,7 +327,12 @@
 }
 
 void ff_mpeg1_encode_slice_header(MpegEncContext *s){
+    if (s->height > 2800) {
+        put_header(s, SLICE_MIN_START_CODE + (s->mb_y & 127));
+        put_bits(&s->pb, 3, s->mb_y >> 7);  /* slice_vertical_position_extension */
+    } else {
     put_header(s, SLICE_MIN_START_CODE + s->mb_y);
+    }
     put_qscale(s);
     put_bits(&s->pb, 1, 0); /* slice extra information */
 }