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 6186E4763B for ; Sat, 13 Apr 2024 19:06:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1E30A68D34D; Sat, 13 Apr 2024 22:06:41 +0300 (EEST) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AC4A168D0CE for ; Sat, 13 Apr 2024 22:06:35 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4183072951eso3018565e9.2 for ; Sat, 13 Apr 2024 12:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1713035195; x=1713639995; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GmFNdXeekgBHoZBzXzJ+33H6q6sjgRwpk/uH72ZmUbU=; b=20Mo3OOqQZWJ4KG+UuJzAZbj4QifFji0Wh2SeEsjyRHvirl6R6d74zDcPjoFng0XBf 83OtAPkSxB4BXWysUtOQsDbO733T6YdBC6F0+XRYk76dVThL/9U0J7oDmqs6MFWwdGyE KH6r2NXEqtBwVrQQyDEvqtonZ6Wm/v6IIwNH27V8Y1mveht/Q5tr5Zyku4xNBH9Z/XRg c0DvbJp5YmZx+iv13JXIrshRuoOZRnFJ++2dnAdSs+HzJ2/hRW3vvAIqYNTcQGB+DapH jDg4pfaMgYQ04Z3zgQw9CO5TyvlzS5Dk0YZEDe9t+To6w403/17FTFnIiHFPMu9jYN+n vPiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713035195; x=1713639995; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GmFNdXeekgBHoZBzXzJ+33H6q6sjgRwpk/uH72ZmUbU=; b=Qlq2og+E+63hNPITe/NgpD4xo1dIsgnyy2dVDg5AspMqUicqKGGZ/dS/x9mBQ+Aj36 v6xmoi1lXKiWppMF1+eua8YWrzwzOLMUj1Ne9wclH7IOUsqZJ7zGNbshpRLOJqPUC6kj BwEZTqZ9TacpZeHLodWYbvad4nEkoYyB0in86m8xO1FF0BjqU8xC+do/XU03fXL19XuS PVupsKpFZQvB2moQihLE1ffjxz9LNHiEopbADzlWAYgrQ3OzHqhpbGBu3Car1Zsd7kEq tJdFhrhMKow9P/CTVMNCwcPAgBCMQJhTrfKiLr8/TRA9dNZv15A1N3lqPzeaIj35U1yL J++Q== X-Gm-Message-State: AOJu0YzXsxZZ9FQQxe85/0L51aD1PR66ffVskuF7qAhHxS0B4WEBsQGC Z4NVuZjCY3H3gpHf413CdNv1BAnLUx/+zYY+VzJTiggGvafXOsSM2WhwVdIQvV423AgoELM7KSx Y X-Google-Smtp-Source: AGHT+IEmy2ng3/J0V9rk+F7n69eq/ftAr6B+LwSV+X9rrxMPWCT9PAMfGdUty/RdDxee6FeGI86daA== X-Received: by 2002:a05:600c:1d08:b0:416:a44e:5f70 with SMTP id l8-20020a05600c1d0800b00416a44e5f70mr5844701wms.30.1713035194638; Sat, 13 Apr 2024 12:06:34 -0700 (PDT) Received: from [192.168.0.15] (cpc92302-cmbg19-2-0-cust1183.5-4.cable.virginm.net. [82.1.212.160]) by smtp.gmail.com with ESMTPSA id l14-20020a5d560e000000b00343cc702c56sm7153036wrv.47.2024.04.13.12.06.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 Apr 2024 12:06:34 -0700 (PDT) Message-ID: <59cc87d5-df14-44fc-b7e4-a5e6728ab478@jkqxz.net> Date: Sat, 13 Apr 2024 20:06:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Mark Thompson To: FFmpeg development discussions and patches References: <610f344b-28e7-40f7-ac13-112069a72563@jkqxz.net> In-Reply-To: <610f344b-28e7-40f7-ac13-112069a72563@jkqxz.net> Subject: [FFmpeg-devel] [PATCH v2 2/2] lavc/vulkan_av1: Use av1dec reference order hint information 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- Changes over v1: fix the OrderHints field as well; move things into the loop over reference names rather than the loop over reference slots. libavcodec/vulkan_av1.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c index c9e398eaec..fcc9a4f03b 100644 --- a/libavcodec/vulkan_av1.c +++ b/libavcodec/vulkan_av1.c @@ -76,7 +76,7 @@ static int vk_av1_fill_pict(AVCodecContext *avctx, const AV1Frame **ref_src, StdVideoDecodeAV1ReferenceInfo *vkav1_std_ref, VkVideoDecodeAV1DpbSlotInfoKHR *vkav1_ref, /* Goes in ^ */ const AV1Frame *pic, int is_current, int has_grain, - int *saved_order_hints) + const uint8_t *saved_order_hints) { FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data; AV1VulkanDecodePicture *hp = pic->hwaccel_picture_private; @@ -242,7 +242,6 @@ static int vk_av1_start_frame(AVCodecContext *avctx, const AV1RawFrameHeader *frame_header = s->raw_frame_header; const AV1RawFilmGrainParams *film_grain = &s->cur_frame.film_grain; - CodedBitstreamAV1Context *cbs_ctx = (CodedBitstreamAV1Context *)(s->cbc->priv_data); const int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && film_grain->apply_grain; @@ -272,7 +271,7 @@ static int vk_av1_start_frame(AVCodecContext *avctx, ap->ref_frame_sign_bias_mask = 0x0; for (int i = 0; i < STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME; i++) - ap->ref_frame_sign_bias_mask |= cbs_ctx->ref_frame_sign_bias[i] << i; + ap->ref_frame_sign_bias_mask |= pic->ref_frame_sign_bias[i] << i; for (int i = 0; i < STD_VIDEO_AV1_REFS_PER_FRAME; i++) { const int idx = pic->raw_frame_header->ref_frame_idx[i]; @@ -294,7 +293,7 @@ static int vk_av1_start_frame(AVCodecContext *avctx, err = vk_av1_fill_pict(avctx, &ap->ref_src[ref_count], &vp->ref_slots[ref_count], &vp->refs[ref_count], &ap->std_refs[ref_count], &ap->vkav1_refs[ref_count], - ref_frame, 0, 0, cbs_ctx->ref[idx].saved_order_hints); + ref_frame, 0, 0, ref_frame->order_hints); if (err < 0) return err; @@ -491,8 +490,14 @@ static int vk_av1_start_frame(AVCodecContext *avctx, } } - for (int i = 0; i < STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME; i++) + for (int i = 0; i < STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME; i++) { + ap->std_pic_info.OrderHints[i] = pic->order_hints[i]; ap->loop_filter.loop_filter_ref_deltas[i] = frame_header->loop_filter_ref_deltas[i]; + ap->global_motion.GmType[i] = s->cur_frame.gm_type[i]; + for (int j = 0; j < STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS; j++) { + ap->global_motion.gm_params[i][j] = s->cur_frame.gm_params[i][j]; + } + } for (int i = 0; i < STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS; i++) { ap->cdef.cdef_y_pri_strength[i] = frame_header->cdef_y_pri_strength[i]; @@ -501,14 +506,6 @@ static int vk_av1_start_frame(AVCodecContext *avctx, ap->cdef.cdef_uv_sec_strength[i] = frame_header->cdef_uv_sec_strength[i]; } - for (int i = 0; i < STD_VIDEO_AV1_NUM_REF_FRAMES; i++) { - ap->std_pic_info.OrderHints[i] = frame_header->ref_order_hint[i]; - ap->global_motion.GmType[i] = s->cur_frame.gm_type[i]; - for (int j = 0; j < STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS; j++) { - ap->global_motion.gm_params[i][j] = s->cur_frame.gm_params[i][j]; - } - } - if (apply_grain) { for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_Y_POINTS; i++) { ap->film_grain.point_y_value[i] = film_grain->point_y_value[i]; -- 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".