[FFmpeg-devel] [PATCH] avcodec/cbs_av1: infer ref_order_hint when not coded in the bitstream
Mark Thompson
sw at jkqxz.net
Wed Nov 11 00:50:05 EET 2020
On 31/10/2020 14:40, James Almer wrote:
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavcodec/cbs_av1_syntax_template.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
> index f351b1de24..dc3d8d1048 100644
> --- a/libavcodec/cbs_av1_syntax_template.c
> +++ b/libavcodec/cbs_av1_syntax_template.c
> @@ -1490,13 +1490,19 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
> fb(8, refresh_frame_flags);
>
> if (!frame_is_intra || current->refresh_frame_flags != all_frames) {
> - if (current->error_resilient_mode && seq->enable_order_hint) {
> + if (seq->enable_order_hint) {
> for (i = 0; i < AV1_NUM_REF_FRAMES; i++) {
> - fbs(order_hint_bits, ref_order_hint[i], 1, i);
> + if (current->error_resilient_mode)
> + fbs(order_hint_bits, ref_order_hint[i], 1, i);
> + else
> + infer(ref_order_hint[i], priv->ref[i].order_hint);
> if (current->ref_order_hint[i] != priv->ref[i].order_hint)
> priv->ref[i].valid = 0;
> }
> }
> + } else if (seq->enable_order_hint) {
> + for (i = 0; i < AV1_NUM_REF_FRAMES; i++)
> + infer(ref_order_hint[i], priv->ref[i].order_hint);
Is filling these on a key frame meaningful in any way? The slots need not be valid at all, such as at the first frame in a stream.
> }
>
> if (current->frame_type == AV1_FRAME_KEY ||
>
Probably good anyway.
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list