Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
9a44ec94
Commit
9a44ec94
authored
Jul 30, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/av1: combine high_bitdepth and twelve_bit into a single bitdepth value
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
0d597a69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
av1.c
libavformat/av1.c
+9
-6
av1.h
libavformat/av1.h
+1
-2
No files found.
libavformat/av1.c
View file @
9a44ec94
...
@@ -94,9 +94,12 @@ static inline void uvlc(GetBitContext *gb)
...
@@ -94,9 +94,12 @@ static inline void uvlc(GetBitContext *gb)
static
int
parse_color_config
(
AV1SequenceParameters
*
seq_params
,
GetBitContext
*
gb
)
static
int
parse_color_config
(
AV1SequenceParameters
*
seq_params
,
GetBitContext
*
gb
)
{
{
seq_params
->
high_bitdepth
=
get_bits1
(
gb
);
int
twelve_bit
=
0
;
if
(
seq_params
->
profile
==
FF_PROFILE_AV1_PROFESSIONAL
&&
seq_params
->
high_bitdepth
)
int
high_bitdepth
=
get_bits1
(
gb
);
seq_params
->
twelve_bit
=
get_bits1
(
gb
);
if
(
seq_params
->
profile
==
FF_PROFILE_AV1_PROFESSIONAL
&&
high_bitdepth
)
twelve_bit
=
get_bits1
(
gb
);
seq_params
->
bitdepth
=
8
+
(
high_bitdepth
*
2
)
+
(
twelve_bit
*
2
);
if
(
seq_params
->
profile
==
FF_PROFILE_AV1_HIGH
)
if
(
seq_params
->
profile
==
FF_PROFILE_AV1_HIGH
)
seq_params
->
monochrome
=
0
;
seq_params
->
monochrome
=
0
;
...
@@ -135,7 +138,7 @@ static int parse_color_config(AV1SequenceParameters *seq_params, GetBitContext *
...
@@ -135,7 +138,7 @@ static int parse_color_config(AV1SequenceParameters *seq_params, GetBitContext *
seq_params
->
chroma_subsampling_x
=
0
;
seq_params
->
chroma_subsampling_x
=
0
;
seq_params
->
chroma_subsampling_y
=
0
;
seq_params
->
chroma_subsampling_y
=
0
;
}
else
{
}
else
{
if
(
seq_params
->
twelve_bit
)
{
if
(
twelve_bit
)
{
seq_params
->
chroma_subsampling_x
=
get_bits1
(
gb
);
seq_params
->
chroma_subsampling_x
=
get_bits1
(
gb
);
if
(
seq_params
->
chroma_subsampling_x
)
if
(
seq_params
->
chroma_subsampling_x
)
seq_params
->
chroma_subsampling_y
=
get_bits1
(
gb
);
seq_params
->
chroma_subsampling_y
=
get_bits1
(
gb
);
...
@@ -383,8 +386,8 @@ int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size)
...
@@ -383,8 +386,8 @@ int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size)
put_bits
(
&
pbc
,
3
,
seq_params
.
profile
);
put_bits
(
&
pbc
,
3
,
seq_params
.
profile
);
put_bits
(
&
pbc
,
5
,
seq_params
.
level
);
put_bits
(
&
pbc
,
5
,
seq_params
.
level
);
put_bits
(
&
pbc
,
1
,
seq_params
.
tier
);
put_bits
(
&
pbc
,
1
,
seq_params
.
tier
);
put_bits
(
&
pbc
,
1
,
seq_params
.
high_bitdepth
);
put_bits
(
&
pbc
,
1
,
seq_params
.
bitdepth
>
8
);
put_bits
(
&
pbc
,
1
,
seq_params
.
twelve_bit
);
put_bits
(
&
pbc
,
1
,
seq_params
.
bitdepth
==
12
);
put_bits
(
&
pbc
,
1
,
seq_params
.
monochrome
);
put_bits
(
&
pbc
,
1
,
seq_params
.
monochrome
);
put_bits
(
&
pbc
,
1
,
seq_params
.
chroma_subsampling_x
);
put_bits
(
&
pbc
,
1
,
seq_params
.
chroma_subsampling_x
);
put_bits
(
&
pbc
,
1
,
seq_params
.
chroma_subsampling_y
);
put_bits
(
&
pbc
,
1
,
seq_params
.
chroma_subsampling_y
);
...
...
libavformat/av1.h
View file @
9a44ec94
...
@@ -29,8 +29,7 @@ typedef struct AV1SequenceParameters {
...
@@ -29,8 +29,7 @@ typedef struct AV1SequenceParameters {
uint8_t
profile
;
uint8_t
profile
;
uint8_t
level
;
uint8_t
level
;
uint8_t
tier
;
uint8_t
tier
;
uint8_t
high_bitdepth
;
uint8_t
bitdepth
;
uint8_t
twelve_bit
;
uint8_t
monochrome
;
uint8_t
monochrome
;
uint8_t
chroma_subsampling_x
;
uint8_t
chroma_subsampling_x
;
uint8_t
chroma_subsampling_y
;
uint8_t
chroma_subsampling_y
;
...
...
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