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
bc10260f
Commit
bc10260f
authored
Dec 21, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mov: simplify parsing of mdcv atom using av_make_q()
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
22ae33fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
mov.c
libavformat/mov.c
+8
-14
No files found.
libavformat/mov.c
View file @
bc10260f
...
@@ -5210,20 +5210,14 @@ static int mov_read_mdcv(MOVContext *c, AVIOContext *pb, MOVAtom atom)
...
@@ -5210,20 +5210,14 @@ static int mov_read_mdcv(MOVContext *c, AVIOContext *pb, MOVAtom atom)
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
const
int
j
=
mapping
[
i
];
const
int
j
=
mapping
[
i
];
sc
->
mastering
->
display_primaries
[
j
][
0
].
num
=
avio_rb16
(
pb
);
sc
->
mastering
->
display_primaries
[
j
][
0
]
=
av_make_q
(
avio_rb16
(
pb
),
chroma_den
);
sc
->
mastering
->
display_primaries
[
j
][
0
].
den
=
chroma_den
;
sc
->
mastering
->
display_primaries
[
j
][
1
]
=
av_make_q
(
avio_rb16
(
pb
),
chroma_den
);
sc
->
mastering
->
display_primaries
[
j
][
1
].
num
=
avio_rb16
(
pb
);
}
sc
->
mastering
->
display_primaries
[
j
][
1
].
den
=
chroma_den
;
sc
->
mastering
->
white_point
[
0
]
=
av_make_q
(
avio_rb16
(
pb
),
chroma_den
);
}
sc
->
mastering
->
white_point
[
1
]
=
av_make_q
(
avio_rb16
(
pb
),
chroma_den
);
sc
->
mastering
->
white_point
[
0
].
num
=
avio_rb16
(
pb
);
sc
->
mastering
->
white_point
[
0
].
den
=
chroma_den
;
sc
->
mastering
->
max_luminance
=
av_make_q
(
avio_rb32
(
pb
),
luma_den
);
sc
->
mastering
->
white_point
[
1
].
num
=
avio_rb16
(
pb
);
sc
->
mastering
->
min_luminance
=
av_make_q
(
avio_rb32
(
pb
),
luma_den
);
sc
->
mastering
->
white_point
[
1
].
den
=
chroma_den
;
sc
->
mastering
->
max_luminance
.
num
=
avio_rb32
(
pb
);
sc
->
mastering
->
max_luminance
.
den
=
luma_den
;
sc
->
mastering
->
min_luminance
.
num
=
avio_rb32
(
pb
);
sc
->
mastering
->
min_luminance
.
den
=
luma_den
;
sc
->
mastering
->
has_luminance
=
1
;
sc
->
mastering
->
has_luminance
=
1
;
sc
->
mastering
->
has_primaries
=
1
;
sc
->
mastering
->
has_primaries
=
1
;
...
...
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