Commit 6f56e0e7 authored by Mark Thompson's avatar Mark Thompson

av1dec: Add force_integer_mv derived field for decoder use

This is not the same as the syntax element value in the frame header
because the specification parsing tables override the value on intra
frames.
parent 9e77188c
......@@ -725,6 +725,8 @@ static void av1_frame_replace(AV1Frame *dst, const AV1Frame *src)
sizeof(dst->ref_frame_sign_bias));
memcpy(dst->order_hints, src->order_hints,
sizeof(dst->order_hints));
dst->force_integer_mv = src->force_integer_mv;
}
static av_cold int av1_decode_free(AVCodecContext *avctx)
......@@ -1255,6 +1257,11 @@ static int get_current_frame(AVCodecContext *avctx)
order_hint_info(s);
load_grain_params(s);
s->cur_frame.force_integer_mv =
s->raw_frame_header->force_integer_mv ||
s->raw_frame_header->frame_type == AV1_FRAME_KEY ||
s->raw_frame_header->frame_type == AV1_FRAME_INTRA_ONLY;
return ret;
}
......
......@@ -67,6 +67,12 @@ typedef struct AV1Frame {
// OrderHints[] when this is the current frame, otherwise
// SavedOrderHints[s][] when is the reference frame in slot s.
uint8_t order_hints[AV1_TOTAL_REFS_PER_FRAME];
// force_integer_mv value at the end of the frame header parsing.
// This is not the same as the syntax element value in
// raw_frame_header because the specification parsing tables
// override the value on intra frames.
uint8_t force_integer_mv;
} AV1Frame;
typedef struct TileGroupInfo {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment