History

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.

Mark Thompson committed 2 years ago

Commit 6f56e0e1 parent 9e771882 files · +13 −0Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/av1dec.c +7 −0
  2. libavcodec/av1dec.h +6 −0
libavcodec/av1dec.c+7−0
@@ -725,6 +725,8 @@ static void av1_frame_replace(AV1Frame *dst, const AV1Frame *src) · 724 unmodified lines
725725 sizeof(dst->ref_frame_sign_bias));
726726 memcpy(dst->order_hints, src->order_hints,
727727 sizeof(dst->order_hints));
728+
729+ dst->force_integer_mv = src->force_integer_mv;
728730 }
729731
730732 static av_cold int av1_decode_free(AVCodecContext *avctx)
@@ -1255,6 +1257,11 @@ static int get_current_frame(AVCodecContext *avctx) · 524 unmodified lines
12551257 order_hint_info(s);
12561258 load_grain_params(s);
12571259
1260+ s->cur_frame.force_integer_mv =
1261+ s->raw_frame_header->force_integer_mv ||
1262+ s->raw_frame_header->frame_type == AV1_FRAME_KEY ||
1263+ s->raw_frame_header->frame_type == AV1_FRAME_INTRA_ONLY;
1264+
12581265 return ret;
12591266 }
12601267
libavcodec/av1dec.h+6−0
@@ -67,6 +67,12 @@ typedef struct AV1Frame { · 66 unmodified lines
6767 // OrderHints[] when this is the current frame, otherwise
6868 // SavedOrderHints[s][] when is the reference frame in slot s.
6969 uint8_t order_hints[AV1_TOTAL_REFS_PER_FRAME];
70+
71+ // force_integer_mv value at the end of the frame header parsing.
72+ // This is not the same as the syntax element value in
73+ // raw_frame_header because the specification parsing tables
74+ // override the value on intra frames.
75+ uint8_t force_integer_mv;
7076 } AV1Frame;
7177
7278 typedef struct TileGroupInfo {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t