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 6DD4045D50 for ; Tue, 6 Jun 2023 11:03:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C2C068C1C2; Tue, 6 Jun 2023 14:03:50 +0300 (EEST) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 24DFB68BFA0 for ; Tue, 6 Jun 2023 14:03:44 +0300 (EEST) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 1D2F6106015D for ; Tue, 6 Jun 2023 11:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1686049423; 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=3Od4j5enZZdSJBS2GiMPVHl2qNWURNF+Ux4EAPNAusU=; b=KoN2x1DPwreySmSC9ox4jPRTIzFvEnixKgzmhidr+UZVYIoi7LwGR7sj/6iEHzwB B0D5UYjJ+lL9gPLcx1nPoAhVdljHjubdL8ZZoVFtSOeX4OA7GpVAb/naLWsvJZ9gWgZ 5vfTxBdK/pXp7FoSdVBr+AuleUhnAp740YnJl1J0NrDN7eNwzdDZJGyabB8zneqDR2q sMtMU3a2USBNNmdlV2aMplt1yk/isehSaYAWzQgaN9/NJvVUB2giacwYtH6nDab5SIt xI/+TLGT+FgQyUFHDq5tzTly8yhjy28mkmHgdqHhF5ia/L0oAZ0qfdVmQoJ26soF2sV /OX+1gY8Sg== Date: Tue, 6 Jun 2023 13:03:43 +0200 (CEST) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_12607_803671499.1686049423536" Subject: [FFmpeg-devel] [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field 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_12607_803671499.1686049423536 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit It was introduced for Vulkan, but it is equivalent to short_term_ref_pic_set_size when !short_term_ref_pic_set_sps_flag, and when !!short_term_ref_pic_set_sps_flag, Vulkan hardcodes a zero anyway. 3-line patch attached. ------=_Part_12607_803671499.1686049423536 Content-Type: text/x-diff; charset=us-ascii; name=0001-hevcdec-remove-redundant-bits_used_for_short_term_rp.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-hevcdec-remove-redundant-bits_used_for_short_term_rp.patch >From 67a4755b97de8fe0e22e25ff4714c76a5b570b44 Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 6 Jun 2023 12:48:11 +0200 Subject: [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field It was introduced for Vulkan, but it is equivalent to short_term_ref_pic_set_size when !short_term_ref_pic_set_sps_flag, and when !!short_term_ref_pic_set_sps_flag, Vulkan hardcodes a zero anyway. --- libavcodec/hevcdec.c | 1 - libavcodec/hevcdec.h | 1 - libavcodec/vulkan_hevc.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index eee77ec4db..a4284921cb 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -723,7 +723,6 @@ static int hls_slice_header(HEVCContext *s) if (ret < 0) return ret; - sh->bits_used_for_short_term_rps = pos - get_bits_left(gb); sh->short_term_rps = &sh->slice_rps; } else { int numbits, rps_idx; diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index 04ec25d540..94609e4699 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h @@ -268,7 +268,6 @@ typedef struct SliceHeader { ///< RPS coded in the slice header itself is stored here int short_term_ref_pic_set_sps_flag; - int bits_used_for_short_term_rps; int short_term_ref_pic_set_size; ShortTermRPS slice_rps; const ShortTermRPS *short_term_rps; diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c index c9b6888410..dcf7e75bc5 100644 --- a/libavcodec/vulkan_hevc.c +++ b/libavcodec/vulkan_hevc.c @@ -788,7 +788,7 @@ static int vk_hevc_start_frame(AVCodecContext *avctx, .NumDeltaPocsOfRefRpsIdx = h->sh.short_term_rps ? h->sh.short_term_rps->rps_idx_num_delta_pocs : 0, .PicOrderCntVal = h->poc, .NumBitsForSTRefPicSetInSlice = !h->sh.short_term_ref_pic_set_sps_flag ? - h->sh.bits_used_for_short_term_rps : 0, + h->sh.short_term_ref_pic_set_size : 0, }; /* Fill in references */ -- 2.40.1 ------=_Part_12607_803671499.1686049423536 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_12607_803671499.1686049423536--