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
2bee43b6
Commit
2bee43b6
authored
Mar 21, 2018
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mxfenc: Add vertical subsampling support
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
77cbe698
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
11 deletions
+22
-11
mxfenc.c
libavformat/mxfenc.c
+11
-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 @
2bee43b6
...
...
@@ -88,6 +88,7 @@ typedef struct MXFStreamContext {
int
color_siting
;
int
signal_standard
;
int
h_chroma_sub_sample
;
int
v_chroma_sub_sample
;
int
temporal_reordering
;
AVRational
aspect_ratio
;
///< display aspect ratio
int
closed_gop
;
///< gop is closed, used in mpeg-2 frame parsing
...
...
@@ -490,6 +491,7 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = {
// 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 */
{
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 */
// Generic Sound Essence Descriptor
{
0x3D02
,
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x01
,
0x01
,
0x04
,
0x04
,
0x02
,
0x03
,
0x01
,
0x04
,
0x00
,
0x00
,
0x00
}},
/* Locked/Unlocked */
...
...
@@ -1140,6 +1142,8 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
desc_size
+=
5
;
if
(
sc
->
signal_standard
)
desc_size
+=
5
;
if
(
sc
->
v_chroma_sub_sample
)
desc_size
+=
8
;
mxf_write_generic_desc
(
s
,
st
,
key
,
desc_size
);
...
...
@@ -1174,6 +1178,12 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
mxf_write_local_tag
(
pb
,
4
,
0x3302
);
avio_wb32
(
pb
,
sc
->
h_chroma_sub_sample
);
// vertical subsampling
if
(
sc
->
v_chroma_sub_sample
)
{
mxf_write_local_tag
(
pb
,
4
,
0x3308
);
avio_wb32
(
pb
,
sc
->
v_chroma_sub_sample
);
}
// color siting
mxf_write_local_tag
(
pb
,
1
,
0x3303
);
avio_w8
(
pb
,
sc
->
color_siting
);
...
...
@@ -2238,6 +2248,7 @@ static int mxf_write_header(AVFormatContext *s)
if
(
pix_desc
)
{
sc
->
component_depth
=
pix_desc
->
comp
[
0
].
depth
;
sc
->
h_chroma_sub_sample
=
1
<<
pix_desc
->
log2_chroma_w
;
sc
->
v_chroma_sub_sample
=
1
<<
pix_desc
->
log2_chroma_h
;
}
switch
(
ff_choose_chroma_location
(
s
,
st
))
{
case
AVCHROMA_LOC_TOPLEFT
:
sc
->
color_siting
=
0
;
break
;
...
...
tests/ref/fate/copy-trac4914
View file @
2bee43b6
2bbcbc55eebf305aec776bce60d09f91
*tests/data/fate/copy-trac4914.mxf
3d0c809bc8e9405663c9a5e610f9e8ef
*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 @
2bee43b6
581d38fa877b2db15615989f335e9eaf
db983aa35ff8fb11eecc353e8dbede0c
tests/ref/fate/time_base
View file @
2bee43b6
0979b614a34f668eb47278448b254000
cc250f19ecf194deeca1b7b22809d19b
tests/ref/lavf/mxf
View file @
2bee43b6
e3f486ec383f9df4e4e7063959c88dd5
*./tests/data/lavf/lavf.mxf
6b19d9f36c84cbfce55b4345d07a4a50
*./tests/data/lavf/lavf.mxf
525881 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
4de1237dea5f8377eed4c8effe037ffb
*./tests/data/lavf/lavf.mxf
f74437af61c3b405ab3fc7629b6c0389
*./tests/data/lavf/lavf.mxf
561209 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0xf21b1b48
73dec65269c3f5ebe67e4e7fa6f2f6b7
*./tests/data/lavf/lavf.mxf
90cefadb27b8df45e87c1066780dbf5d
*./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 @
2bee43b6
ea6d7025d72df9aaf63bdbc2be8c82dc
*./tests/data/lavf/lavf.mxf_d10
6cef072ed3bc838e776334c665a0e4e0
*./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 @
2bee43b6
2f8cb1656178419950a9a3505cae3f5b
*./tests/data/lavf/lavf.mxf_dv25
a1360106323c36ca5c0822ea9cbee3ea
*./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 @
2bee43b6
9377a3afbf431442e17c5d891b4e6252
*./tests/data/lavf/lavf.mxf_dvcpro50
f7942565dab23159d6aa60d6a943757a
*./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 @
2bee43b6
ebf818890f92bb9710798a3e2ab571fd
*./tests/data/lavf/lavf.mxf_opatom
deaf3a54743b718422248c318c935277
*./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 @
2bee43b6
b79b636502d47239def6e85ab8cc06b3
*./tests/data/lavf/lavf.mxf_opatom_audio
ac49423bc7350dba64bde66768c26cc1
*./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