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 2F5DF47D6D for ; Tue, 24 Oct 2023 04:37:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A9CCB68C9BC; Tue, 24 Oct 2023 07:37:09 +0300 (EEST) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C183F680B12 for ; Tue, 24 Oct 2023 07:37:03 +0300 (EEST) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 6779E10602D1 for ; Tue, 24 Oct 2023 04:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1698122223; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=Eth3aOUKT2UPD5G+LMFLhhV/Q6yjA0kpUI92W25FAOw=; b=2FcaUwxQHTxU/o4+60C/LLsGOjDCfkYCTiJM2tR8IbFJsjtNU2QCJmdS9+tPHATC bciaIiGlrnVKVqU8A7ovaVVxN1s76RPQUaPlKJvbXugBFoedEjPZwULxlSvNup9L4Mu m+C8XMoy5ElD5jBWT20mqZoK3bj3FsXZWgdLxcO288IS3BF3CE5+cTL1yYQzNzVlJCy mUDHtI/5n0EDkoFTDzxHO0TQhiGa+ditFjCvTfMjk9mvDGltoYQQm4uRy661EUrx0X0 RrowwGQWOPIJKDSmVzPzL4S5wiTCvgyPUwwusG40D5RbttTnwPEfRqCZmgQrP7fd+Fe 0raCuqidTA== Date: Tue, 24 Oct 2023 06:37:03 +0200 (CEST) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_649906_609659291.1698122223364" Subject: [FFmpeg-devel] [PATCH] vulkan_decode: use coded_width/height instead of the non-coded width and h 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: ------=_Part_649906_609659291.1698122223364 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Fixes several samples. There may be issues with cropping, but so far, I have not found any in my samples set. Patch attached. ------=_Part_649906_609659291.1698122223364 Content-Type: text/x-diff; charset=us-ascii; name=0001-vulkan_decode-use-coded_width-height-instead-of-the-.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-vulkan_decode-use-coded_width-height-instead-of-the-.patch >From b928053158ec5f63d3c07a9daa9b802cb9229858 Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 24 Oct 2023 06:33:07 +0200 Subject: [PATCH] vulkan_decode: use coded_width/height instead of the non-coded width and height Fixes several samples. There may be issues with cropping, but so far, I have not found any in my samples set. --- libavcodec/vulkan_decode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index e6a0646139..3b9576c0a9 100644 --- a/libavcodec/vulkan_decode.c +++ b/libavcodec/vulkan_decode.c @@ -872,10 +872,10 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_ " separate_references" : ""); /* Check if decoding is possible with the given parameters */ - if (avctx->width < caps->minCodedExtent.width || - avctx->height < caps->minCodedExtent.height || - avctx->width > caps->maxCodedExtent.width || - avctx->height > caps->maxCodedExtent.height) + if (avctx->coded_width < caps->minCodedExtent.width || + avctx->coded_height < caps->minCodedExtent.height || + avctx->coded_width > caps->maxCodedExtent.width || + avctx->coded_height > caps->maxCodedExtent.height) return AVERROR(EINVAL); if (!(avctx->hwaccel_flags & AV_HWACCEL_FLAG_IGNORE_LEVEL) && @@ -1027,8 +1027,8 @@ int ff_vk_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) frames_ctx->user_opaque = prof; frames_ctx->free = free_profile_data; - frames_ctx->width = avctx->width; - frames_ctx->height = avctx->height; + frames_ctx->width = avctx->coded_width; + frames_ctx->height = avctx->coded_height; frames_ctx->format = AV_PIX_FMT_VULKAN; hwfc->format[0] = vkfmt; @@ -1224,8 +1224,8 @@ int ff_vk_decode_init(AVCodecContext *avctx) dpb_frames = (AVHWFramesContext *)ctx->dpb_hwfc_ref->data; dpb_frames->format = s->frames->format; dpb_frames->sw_format = s->frames->sw_format; - dpb_frames->width = s->frames->width; - dpb_frames->height = s->frames->height; + dpb_frames->width = avctx->coded_width; + dpb_frames->height = avctx->coded_height; dpb_hwfc = dpb_frames->hwctx; dpb_hwfc->create_pnext = (void *)ff_vk_find_struct(ctx->s.hwfc->create_pnext, -- 2.42.0 ------=_Part_649906_609659291.1698122223364 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". ------=_Part_649906_609659291.1698122223364--