Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
6d033909
Commit
6d033909
authored
Apr 05, 2018
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mxfenc: add white/black ref /color range
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
2bee43b6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
11 deletions
+33
-11
mxfenc.c
libavformat/mxfenc.c
+22
-0
copy-trac4914
tests/ref/fate/copy-trac4914
+1
-1
mxf-reel_name
tests/ref/fate/mxf-reel_name
+1
-1
time_base
tests/ref/fate/time_base
+1
-1
mxf
tests/ref/lavf/mxf
+3
-3
mxf_d10
tests/ref/lavf/mxf_d10
+1
-1
mxf_dv25
tests/ref/lavf/mxf_dv25
+1
-1
mxf_dvcpro50
tests/ref/lavf/mxf_dvcpro50
+1
-1
mxf_opatom
tests/ref/lavf/mxf_opatom
+1
-1
mxf_opatom_audio
tests/ref/lavf/mxf_opatom_audio
+1
-1
No files found.
libavformat/mxfenc.c
View file @
6d033909
...
...
@@ -493,6 +493,9 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = {
{
0x3302
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x01
,
0x05
,
0x00
,
0x00
,
0x00
}},
/* Horizontal Subsampling */
{
0x3308
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x02
,
0x04
,
0x01
,
0x05
,
0x01
,
0x10
,
0x00
,
0x00
,
0x00
}},
/* Vertical Subsampling */
{
0x3303
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x01
,
0x06
,
0x00
,
0x00
,
0x00
}},
/* Color Siting */
{
0x3304
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x03
,
0x03
,
0x00
,
0x00
,
0x00
}},
/* Black Ref level */
{
0x3305
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x01
,
0x04
,
0x01
,
0x05
,
0x03
,
0x04
,
0x00
,
0x00
,
0x00
}},
/* White Ref level */
{
0x3306
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x02
,
0x04
,
0x01
,
0x05
,
0x03
,
0x05
,
0x00
,
0x00
,
0x00
}},
/* Color Range */
// Generic Sound Essence Descriptor
{
0x3D02
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x04
,
0x04
,
0x02
,
0x03
,
0x01
,
0x04
,
0x00
,
0x00
,
0x00
}},
/* Locked/Unlocked */
{
0x3D03
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x05
,
0x04
,
0x02
,
0x03
,
0x01
,
0x01
,
0x01
,
0x00
,
0x00
}},
/* Audio sampling rate */
...
...
@@ -1144,6 +1147,8 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
desc_size
+=
5
;
if
(
sc
->
v_chroma_sub_sample
)
desc_size
+=
8
;
if
(
st
->
codecpar
->
color_range
!=
AVCOL_RANGE_UNSPECIFIED
)
desc_size
+=
8
*
3
;
mxf_write_generic_desc
(
s
,
st
,
key
,
desc_size
);
...
...
@@ -1188,6 +1193,23 @@ 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
(
st
->
codecpar
->
color_range
!=
AVCOL_RANGE_UNSPECIFIED
)
{
int
black
=
0
,
white
=
(
1
<<
sc
->
component_depth
)
-
1
,
color
=
(
1
<<
sc
->
component_depth
)
-
1
;
if
(
st
->
codecpar
->
color_range
==
AVCOL_RANGE_MPEG
)
{
black
=
1
<<
(
sc
->
component_depth
-
4
);
white
=
235
<<
(
sc
->
component_depth
-
8
);
color
=
(
14
<<
(
sc
->
component_depth
-
4
))
+
1
;
}
mxf_write_local_tag
(
pb
,
4
,
0x3304
);
avio_wb32
(
pb
,
black
);
mxf_write_local_tag
(
pb
,
4
,
0x3305
);
avio_wb32
(
pb
,
white
);
mxf_write_local_tag
(
pb
,
4
,
0x3306
);
avio_wb32
(
pb
,
color
);
}
if
(
sc
->
signal_standard
)
{
mxf_write_local_tag
(
pb
,
1
,
0x3215
);
avio_w8
(
pb
,
sc
->
signal_standard
);
...
...
tests/ref/fate/copy-trac4914
View file @
6d033909
3d0c809bc8e9405663c9a5e610f9e8ef
*tests/data/fate/copy-trac4914.mxf
413822e81bf2e8e15253c5f454dd4f89
*tests/data/fate/copy-trac4914.mxf
561209 tests/data/fate/copy-trac4914.mxf
#tb 0: 1001/30000
#media_type 0: video
...
...
tests/ref/fate/mxf-reel_name
View file @
6d033909
db983aa35ff8fb11eecc353e8dbede0c
af45493a137fefc30012b622e87655fb
tests/ref/fate/time_base
View file @
6d033909
cc250f19ecf194deeca1b7b22809d19b
a2af9615e99800d1a8d9d4beb52fde17
tests/ref/lavf/mxf
View file @
6d033909
6b19d9f36c84cbfce55b4345d07a4a50
*./tests/data/lavf/lavf.mxf
b88e19419e438822ce844f2126ead987
*./tests/data/lavf/lavf.mxf
525881 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
f74437af61c3b405ab3fc7629b6c0389
*./tests/data/lavf/lavf.mxf
518a71066087fef4f24b0e1b3c1c31f0
*./tests/data/lavf/lavf.mxf
561209 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0xf21b1b48
90cefadb27b8df45e87c1066780dbf5d
*./tests/data/lavf/lavf.mxf
cf62629801992052a4c6bfc4793ce489
*./tests/data/lavf/lavf.mxf
525881 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
tests/ref/lavf/mxf_d10
View file @
6d033909
6cef072ed3bc838e776334c665a0e4e0
*./tests/data/lavf/lavf.mxf_d10
4e54e7d5be04c5b7db145b2315d23771
*./tests/data/lavf/lavf.mxf_d10
5331501 ./tests/data/lavf/lavf.mxf_d10
./tests/data/lavf/lavf.mxf_d10 CRC=0x6c74d488
tests/ref/lavf/mxf_dv25
View file @
6d033909
a1360106323c36ca5c0822ea9cbee3ea
*./tests/data/lavf/lavf.mxf_dv25
eb9eff93337cc2273cd01fa0e5416555
*./tests/data/lavf/lavf.mxf_dv25
3833901 ./tests/data/lavf/lavf.mxf_dv25
./tests/data/lavf/lavf.mxf_dv25 CRC=0xbdaf7f52
tests/ref/lavf/mxf_dvcpro50
View file @
6d033909
f7942565dab23159d6aa60d6a943757a
*./tests/data/lavf/lavf.mxf_dvcpro50
1665f75a926581a3bc94723e95c16d08
*./tests/data/lavf/lavf.mxf_dvcpro50
7430701 ./tests/data/lavf/lavf.mxf_dvcpro50
./tests/data/lavf/lavf.mxf_dvcpro50 CRC=0xe3bbe4b4
tests/ref/lavf/mxf_opatom
View file @
6d033909
deaf3a54743b718422248c318c93527
7 *./tests/data/lavf/lavf.mxf_opatom
69f093d69ba6bd61b3904c259e6f381
7 *./tests/data/lavf/lavf.mxf_opatom
4717113 ./tests/data/lavf/lavf.mxf_opatom
./tests/data/lavf/lavf.mxf_opatom CRC=0xf55aa22a
tests/ref/lavf/mxf_opatom_audio
View file @
6d033909
ac49423bc7350dba64bde66768c26cc1
*./tests/data/lavf/lavf.mxf_opatom_audio
2adc59eeb7f4ce094b735527cfd13bfb
*./tests/data/lavf/lavf.mxf_opatom_audio
102457 ./tests/data/lavf/lavf.mxf_opatom_audio
./tests/data/lavf/lavf.mxf_opatom_audio CRC=0xd155c6ff
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment