Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
cafb4c55
Commit
cafb4c55
authored
Mar 20, 2024
by
Mark Thompson
Committed by
Lynne
Mar 25, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/cbs_av1: Save more frame ordering information
This is wanted by the Vulkan decoder.
parent
f1e34f15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
cbs_av1.h
libavcodec/cbs_av1.h
+5
-0
cbs_av1_syntax_template.c
libavcodec/cbs_av1_syntax_template.c
+21
-4
No files found.
libavcodec/cbs_av1.h
View file @
cafb4c55
...
...
@@ -427,6 +427,8 @@ typedef struct AV1ReferenceFrameState {
int
bit_depth
;
// RefBitDepth
int
order_hint
;
// RefOrderHint
int
saved_order_hints
[
AV1_TOTAL_REFS_PER_FRAME
];
// SavedOrderHints[ref]
int8_t
loop_filter_ref_deltas
[
AV1_TOTAL_REFS_PER_FRAME
];
int8_t
loop_filter_mode_deltas
[
2
];
uint8_t
feature_enabled
[
AV1_MAX_SEGMENTS
][
AV1_SEG_LVL_MAX
];
...
...
@@ -464,6 +466,9 @@ typedef struct CodedBitstreamAV1Context {
int
tile_rows
;
int
tile_num
;
int
order_hints
[
AV1_TOTAL_REFS_PER_FRAME
];
// OrderHints
int
ref_frame_sign_bias
[
AV1_TOTAL_REFS_PER_FRAME
];
// RefFrameSignBias
AV1ReferenceFrameState
ref
[
AV1_NUM_REF_FRAMES
];
// AVOptions
...
...
libavcodec/cbs_av1_syntax_template.c
View file @
cafb4c55
...
...
@@ -1414,6 +1414,8 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
priv
->
ref
[
i
].
valid
=
0
;
priv
->
ref
[
i
].
order_hint
=
0
;
}
for
(
i
=
0
;
i
<
AV1_REFS_PER_FRAME
;
i
++
)
priv
->
order_hints
[
i
+
AV1_REF_FRAME_LAST
]
=
0
;
}
flag
(
disable_cdf_update
);
...
...
@@ -1568,11 +1570,20 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
else
flag
(
use_ref_frame_mvs
);
infer
(
allow_intrabc
,
0
);
}
for
(
i
=
0
;
i
<
AV1_REFS_PER_FRAME
;
i
++
)
{
int
ref_frame
=
AV1_REF_FRAME_LAST
+
i
;
int
hint
=
priv
->
ref
[
current
->
ref_frame_idx
[
i
]].
order_hint
;
priv
->
order_hints
[
ref_frame
]
=
hint
;
if
(
!
seq
->
enable_order_hint
)
{
priv
->
ref_frame_sign_bias
[
ref_frame
]
=
0
;
}
else
{
priv
->
ref_frame_sign_bias
[
ref_frame
]
=
cbs_av1_get_relative_dist
(
seq
,
hint
,
current
->
order_hint
)
>
0
;
}
}
if
(
!
frame_is_intra
)
{
// Derive reference frame sign biases.
infer
(
allow_intrabc
,
0
);
}
if
(
seq
->
reduced_still_picture_header
||
current
->
disable_cdf_update
)
...
...
@@ -1674,6 +1685,12 @@ update_refs:
.
bit_depth
=
priv
->
bit_depth
,
.
order_hint
=
priv
->
order_hint
,
};
for
(
int
j
=
0
;
j
<
AV1_REFS_PER_FRAME
;
j
++
)
{
priv
->
ref
[
i
].
saved_order_hints
[
j
+
AV1_REF_FRAME_LAST
]
=
priv
->
order_hints
[
j
+
AV1_REF_FRAME_LAST
];
}
memcpy
(
priv
->
ref
[
i
].
loop_filter_ref_deltas
,
current
->
loop_filter_ref_deltas
,
sizeof
(
current
->
loop_filter_ref_deltas
));
memcpy
(
priv
->
ref
[
i
].
loop_filter_mode_deltas
,
current
->
loop_filter_mode_deltas
,
...
...
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