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
11a38be9
Commit
11a38be9
authored
Aug 26, 2019
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mxfenc: correctly set width values for dvcprohd
parent
45f03cdd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
mxfenc.c
libavformat/mxfenc.c
+12
-3
No files found.
libavformat/mxfenc.c
View file @
11a38be9
...
@@ -1190,7 +1190,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
...
@@ -1190,7 +1190,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
{
{
MXFStreamContext
*
sc
=
st
->
priv_data
;
MXFStreamContext
*
sc
=
st
->
priv_data
;
AVIOContext
*
pb
=
s
->
pb
;
AVIOContext
*
pb
=
s
->
pb
;
int
stored_width
=
(
st
->
codecpar
->
width
+
15
)
/
16
*
16
;
int
stored_width
=
0
;
int
stored_height
=
(
st
->
codecpar
->
height
+
15
)
/
16
*
16
;
int
stored_height
=
(
st
->
codecpar
->
height
+
15
)
/
16
*
16
;
int
display_height
;
int
display_height
;
int
f1
,
f2
;
int
f1
,
f2
;
...
@@ -1199,6 +1199,15 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
...
@@ -1199,6 +1199,15 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
get_trc
(
transfer_ul
,
st
->
codecpar
->
color_trc
);
get_trc
(
transfer_ul
,
st
->
codecpar
->
color_trc
);
if
(
st
->
codecpar
->
codec_id
==
AV_CODEC_ID_DVVIDEO
)
{
if
(
st
->
codecpar
->
height
==
1080
)
stored_width
=
1920
;
else
if
(
st
->
codecpar
->
height
==
720
)
stored_width
=
1280
;
}
if
(
!
stored_width
)
stored_width
=
(
st
->
codecpar
->
width
+
15
)
/
16
*
16
;
mxf_write_local_tag
(
pb
,
4
,
0x3203
);
mxf_write_local_tag
(
pb
,
4
,
0x3203
);
avio_wb32
(
pb
,
stored_width
);
avio_wb32
(
pb
,
stored_width
);
...
@@ -1221,7 +1230,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
...
@@ -1221,7 +1230,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
//Sampled width
//Sampled width
mxf_write_local_tag
(
pb
,
4
,
0x3205
);
mxf_write_local_tag
(
pb
,
4
,
0x3205
);
avio_wb32
(
pb
,
st
->
codecpar
->
width
);
avio_wb32
(
pb
,
st
ored_
width
);
//Samples height
//Samples height
mxf_write_local_tag
(
pb
,
4
,
0x3204
);
mxf_write_local_tag
(
pb
,
4
,
0x3204
);
...
@@ -1236,7 +1245,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
...
@@ -1236,7 +1245,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
avio_wb32
(
pb
,
0
);
avio_wb32
(
pb
,
0
);
mxf_write_local_tag
(
pb
,
4
,
0x3209
);
mxf_write_local_tag
(
pb
,
4
,
0x3209
);
avio_wb32
(
pb
,
st
->
codecpar
->
width
);
avio_wb32
(
pb
,
st
ored_
width
);
if
(
st
->
codecpar
->
height
==
608
)
// PAL + VBI
if
(
st
->
codecpar
->
height
==
608
)
// PAL + VBI
display_height
=
576
;
display_height
=
576
;
...
...
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