summaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-06 22:36:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-06 22:36:07 +0200
commit5163fb9446f38eed7b950f285954bb8d3bde3899 (patch)
treea18369c55b4da7425bfbbeadac0b2c474e499600 /libavcodec/mpeg12enc.c
parent7eb5b20a87c1b786759de6b61cd6655edbb3e320 (diff)
parent8a06794112d02a5707f766b8b38a5d50dfd03898 (diff)
downloadffmpeg-streaming-5163fb9446f38eed7b950f285954bb8d3bde3899.zip
ffmpeg-streaming-5163fb9446f38eed7b950f285954bb8d3bde3899.tar.gz
Merge commit '8a06794112d02a5707f766b8b38a5d50dfd03898'
* commit '8a06794112d02a5707f766b8b38a5d50dfd03898': mpeg2: add sequence display extension information Conflicts: libavcodec/mpeg12enc.c tests/ref/lavf/gxf tests/ref/lavf/mxf tests/ref/lavf/mxf_d10 tests/ref/lavf/ts tests/ref/seek/lavf-gxf tests/ref/seek/lavf-mxf tests/ref/seek/lavf-ts tests/ref/seek/vsynth2-mpeg2-422 tests/ref/seek/vsynth2-mpeg2-idct-int tests/ref/seek/vsynth2-mpeg2-ilace tests/ref/seek/vsynth2-mpeg2-ivlc-qprd tests/ref/seek/vsynth2-mpeg2-thread tests/ref/seek/vsynth2-mpeg2-thread-ivlc tests/ref/vsynth/vsynth1-mpeg2 tests/ref/vsynth/vsynth1-mpeg2-422 tests/ref/vsynth/vsynth1-mpeg2-idct-int tests/ref/vsynth/vsynth1-mpeg2-ilace tests/ref/vsynth/vsynth1-mpeg2-ivlc-qprd tests/ref/vsynth/vsynth1-mpeg2-thread tests/ref/vsynth/vsynth1-mpeg2-thread-ivlc tests/ref/vsynth/vsynth2-mpeg2 tests/ref/vsynth/vsynth2-mpeg2-422 tests/ref/vsynth/vsynth2-mpeg2-idct-int tests/ref/vsynth/vsynth2-mpeg2-ilace tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd tests/ref/vsynth/vsynth2-mpeg2-thread tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12enc.c')
-rw-r--r--libavcodec/mpeg12enc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index be68ddc..5680945 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -329,6 +329,18 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
put_bits(&s->pb, 1, s->low_delay);
put_bits(&s->pb, 2, s->mpeg2_frame_rate_ext.num-1); // frame_rate_ext_n
put_bits(&s->pb, 5, s->mpeg2_frame_rate_ext.den-1); // frame_rate_ext_d
+
+ put_header(s, EXT_START_CODE);
+ put_bits(&s->pb, 4, 2); // sequence display extension
+ put_bits(&s->pb, 3, 0); // video_format: 0 is components
+ put_bits(&s->pb, 1, 1); // colour_description
+ put_bits(&s->pb, 8, s->avctx->color_primaries); // colour_primaries
+ put_bits(&s->pb, 8, s->avctx->color_trc); // transfer_characteristics
+ put_bits(&s->pb, 8, s->avctx->colorspace); // matrix_coefficients
+ put_bits(&s->pb, 14, s->width); // display_horizontal_size
+ put_bits(&s->pb, 1, 1); // marker_bit
+ put_bits(&s->pb, 14, s->height); // display_vertical_size
+ put_bits(&s->pb, 3, 0); // remaining 3 bits are zero padding
}
put_header(s, GOP_START_CODE);
OpenPOWER on IntegriCloud