[FFmpeg-cvslog] avformat/mxfenc: Support storing signal standard for D10 muxing
Michael Niedermayer
git at videolan.org
Thu May 28 13:51:45 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 24 02:43:26 2015 +0200| [5a3d2541bd59b52e9357f3f55499e98c3d4e522a] | committer: Michael Niedermayer
avformat/mxfenc: Support storing signal standard for D10 muxing
Reviewed-by: tim nicholson <nichot20 at yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a3d2541bd59b52e9357f3f55499e98c3d4e522a
---
libavformat/mxfenc.c | 11 +++++++++++
tests/ref/lavf/mxf | 6 +++---
tests/ref/lavf/mxf_d10 | 2 +-
tests/ref/lavf/mxf_opatom | 2 +-
tests/ref/lavf/mxf_opatom_audio | 2 +-
5 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index adac69e..63471e6 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -80,6 +80,7 @@ typedef struct MXFStreamContext {
int field_dominance; ///< tff=1, bff=2
int component_depth;
int color_siting;
+ int signal_standard;
int h_chroma_sub_sample;
int temporal_reordering;
AVRational aspect_ratio; ///< display aspect ratio
@@ -414,6 +415,7 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = {
{ 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */
{ 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */
{ 0x3212, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x03,0x01,0x06,0x00,0x00,0x00}}, /* Field Dominance (Opt) */
+ { 0x3215, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x05,0x01,0x13,0x00,0x00,0x00,0x00}}, /* Signal Standard */
// CDCI Picture Essence Descriptor
{ 0x3301, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x05,0x03,0x0A,0x00,0x00,0x00}}, /* Component Depth */
{ 0x3302, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x05,0x00,0x00,0x00}}, /* Horizontal Subsampling */
@@ -998,6 +1000,8 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
unsigned desc_size = size+8+8+8+8+8+8+8+5+16+sc->interlaced*4+12+20+5;
if (sc->interlaced && sc->field_dominance)
desc_size += 5;
+ if (sc->signal_standard)
+ desc_size += 5;
mxf_write_generic_desc(s, st, key, desc_size);
@@ -1036,6 +1040,11 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
mxf_write_local_tag(pb, 1, 0x3303);
avio_w8(pb, sc->color_siting);
+ if (sc->signal_standard) {
+ mxf_write_local_tag(pb, 1, 0x3215);
+ avio_w8(pb, sc->signal_standard);
+ }
+
// frame layout
mxf_write_local_tag(pb, 1, 0x320C);
avio_w8(pb, sc->interlaced);
@@ -2091,6 +2100,8 @@ static int mxf_write_header(AVFormatContext *s)
mxf->edit_unit_byte_count += klv_fill_size(mxf->edit_unit_byte_count);
mxf->edit_unit_byte_count += 16 + 4 + 4 + spf->samples_per_frame[0]*8*4;
mxf->edit_unit_byte_count += klv_fill_size(mxf->edit_unit_byte_count);
+
+ sc->signal_standard = 1;
}
} else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
if (st->codec->sample_rate != 48000) {
diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf
index 4885bee..248b144 100644
--- a/tests/ref/lavf/mxf
+++ b/tests/ref/lavf/mxf
@@ -1,9 +1,9 @@
-bda6be285b4f275b6d8a74e1c5c5aec9 *./tests/data/lavf/lavf.mxf
+25db47584d9c494dea21828eb33c0e36 *./tests/data/lavf/lavf.mxf
525881 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0xdbfff6f1
-a93989cd8e80e9edcce60a2f01eb068b *./tests/data/lavf/lavf.mxf
+9bc9964c9640df6aebae856cc3f431e9 *./tests/data/lavf/lavf.mxf
561209 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x11a6178e
-c0b9255defc9f0494084e2b286f222b9 *./tests/data/lavf/lavf.mxf
+357eadc0b797764987afc0109c1efbc4 *./tests/data/lavf/lavf.mxf
525881 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0xdbfff6f1
diff --git a/tests/ref/lavf/mxf_d10 b/tests/ref/lavf/mxf_d10
index 9324465..35a44fc 100644
--- a/tests/ref/lavf/mxf_d10
+++ b/tests/ref/lavf/mxf_d10
@@ -1,3 +1,3 @@
-bb8f8e2661e1c81fe4e1ce7900b54200 *./tests/data/lavf/lavf.mxf_d10
+791fa19b49065b9877f157fc4f01999a *./tests/data/lavf/lavf.mxf_d10
5330989 ./tests/data/lavf/lavf.mxf_d10
./tests/data/lavf/lavf.mxf_d10 CRC=0x6c74d488
diff --git a/tests/ref/lavf/mxf_opatom b/tests/ref/lavf/mxf_opatom
index 9c9ab15..0b6a957 100644
--- a/tests/ref/lavf/mxf_opatom
+++ b/tests/ref/lavf/mxf_opatom
@@ -1,3 +1,3 @@
-2c1a3b94af9e7c606532b1b636902b3a *./tests/data/lavf/lavf.mxf_opatom
+903fe08625ff84a5a667566aaaac3cf9 *./tests/data/lavf/lavf.mxf_opatom
4717113 ./tests/data/lavf/lavf.mxf_opatom
./tests/data/lavf/lavf.mxf_opatom CRC=0xbdd696b9
diff --git a/tests/ref/lavf/mxf_opatom_audio b/tests/ref/lavf/mxf_opatom_audio
index 2f79246..3c6aabf 100644
--- a/tests/ref/lavf/mxf_opatom_audio
+++ b/tests/ref/lavf/mxf_opatom_audio
@@ -1,3 +1,3 @@
-d571768dd4e32b56917fb76abdb40570 *./tests/data/lavf/lavf.mxf_opatom_audio
+019ec38a36d41e62d9ebdd25ff7e471f *./tests/data/lavf/lavf.mxf_opatom_audio
102457 ./tests/data/lavf/lavf.mxf_opatom_audio
./tests/data/lavf/lavf.mxf_opatom_audio CRC=0xd155c6ff
More information about the ffmpeg-cvslog
mailing list