Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/6] av1dec: Add force_integer_mv derived field for decoder use
@ 2024-04-27 15:30 Mark Thompson
  2024-04-27 15:30 ` [FFmpeg-devel] [PATCH 2/6] dxva2_av1: Use av1dec force_integer_mv value Mark Thompson
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Mark Thompson @ 2024-04-27 15:30 UTC (permalink / raw)
  To: ffmpeg-devel

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.
---
On 27/04/2024 15:58, Lynne wrote:
> This looks better to me.

HYG.

Of these, only VAAPI tested.  (And probably it never did anything anyway.)

 libavcodec/av1dec.c | 7 +++++++
 libavcodec/av1dec.h | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 79a30a114d..601e3f05e1 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -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;
 }
 
diff --git a/libavcodec/av1dec.h b/libavcodec/av1dec.h
index 66a732d781..8b2a7b0896 100644
--- a/libavcodec/av1dec.h
+++ b/libavcodec/av1dec.h
@@ -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 {
-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-06 19:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-27 15:30 [FFmpeg-devel] [PATCH 1/6] av1dec: Add force_integer_mv derived field for decoder use Mark Thompson
2024-04-27 15:30 ` [FFmpeg-devel] [PATCH 2/6] dxva2_av1: Use av1dec force_integer_mv value Mark Thompson
2024-04-27 15:30 ` [FFmpeg-devel] [PATCH 3/6] vdpau_av1: " Mark Thompson
2024-04-27 15:30 ` [FFmpeg-devel] [PATCH 4/6] nvdec_av1: " Mark Thompson
2024-05-06 17:19   ` Timo Rothenpieler
2024-05-06 19:30     ` Mark Thompson
2024-04-27 15:30 ` [FFmpeg-devel] [PATCH 5/6] vaapi_av1: Fix " Mark Thompson
2024-04-30  6:03   ` Xiang, Haihao
2024-04-27 15:30 ` [FFmpeg-devel] [PATCH 6/6] vulkan_av1: " Mark Thompson

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git