From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6658249A63 for ; Sat, 27 Apr 2024 15:30:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7CD1168D2B5; Sat, 27 Apr 2024 18:30:24 +0300 (EEST) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29E8D68CFCE for ; Sat, 27 Apr 2024 18:30:18 +0300 (EEST) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-41b7a26326eso13527075e9.3 for ; Sat, 27 Apr 2024 08:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1714231817; x=1714836617; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=6kOQyO1A7FEMORPSR8jwQNZEc+iP5ElU6S/uWR/349c=; b=1lkpP96OrrPDgwRyvRpIL4kdXMY9p2WbW58CrguvdSuMo5l4Imu+zIIGF7uY1G/1Co i4+CFsQgJ5ia/mGHNGky5Jtf3/thNP3IHXuJg/Y7UB2+1Ny3q0A2VugqMqRKn611vc/y v0d+xmXblNh35boU440TvRt0W4iUEi6H3GYSXPFEaB6YcKZIfqbfjivUPTGNhrkmZNor 3iQjfbfXZUVznuMddXOcN4mOiLzU7KCHzMQPE3J3+130Bx75NESVFckoqOMCZVl04XrY kPoahKaOGc7Egd9O39fdH/21oPdbFyvcvh88ttXwLd2H+jazKcFRpFD3euwvFaNEbaeH kl1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714231817; x=1714836617; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6kOQyO1A7FEMORPSR8jwQNZEc+iP5ElU6S/uWR/349c=; b=jIxYuUVixE00n5EFdbWA1A2FYhWhAWol27BiqeHHXjuNALdSQ9yh82bVW9jDckRino YkGviWeoAFjuEaw/X10PmvY4fwMRt+PVjbeRKCSsdRBeTh+ge9GupwK8bRmIf8LhiDyc rpWKBF7HtrlSt3AJdZEY16teF0osXFfySpwStoiWj31KDno6oFwynlOHVkI7kASAW+Wx V8KzloPFAokAB3mvytIRkBJhkJ3RWiU8Plf3P2U+yDX9jpNBw6laH0Im3k7d+va7a78C h3urK9AetBrOZ5NGJe0UICpAOgiD3YLm13NBI847edwZEI71XRAjb8WBOwttzFVRyg2A UZmQ== X-Gm-Message-State: AOJu0YwC/a/YvtpaVBZuBHCpv2EtVb3BjEnoWssuVpQck2tKaJ4+DB93 UdNkmyocSgKg3e6n9TeqSqKUiGs9yynF2RzQW6WV2Rzg1jrr8tN5sJmqDb+8u4+zN6f7gPVI4lJ n X-Google-Smtp-Source: AGHT+IH0sDN9BiNaLiAmA6JCYPhkad/JUZui9rlnDiilJvb1Pa/Y4iIkgTRlZezo0fuD5pJgLUKDaA== X-Received: by 2002:a5d:5581:0:b0:34b:e446:3e6 with SMTP id i1-20020a5d5581000000b0034be44603e6mr3860383wrv.3.1714231817357; Sat, 27 Apr 2024 08:30:17 -0700 (PDT) Received: from localhost.localdomain (cpc92302-cmbg19-2-0-cust1183.5-4.cable.virginm.net. [82.1.212.160]) by smtp.gmail.com with ESMTPSA id x12-20020adfdd8c000000b00349f139dbe4sm25195722wrl.91.2024.04.27.08.30.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 08:30:17 -0700 (PDT) From: Mark Thompson To: ffmpeg-devel@ffmpeg.org Date: Sat, 27 Apr 2024 16:30:22 +0100 Message-ID: <20240427153034.990042-1-sw@jkqxz.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/6] av1dec: Add force_integer_mv derived field for decoder use X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".