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 2CE6347A04 for ; Tue, 27 Feb 2024 03:50:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0C7E768CAB9; Tue, 27 Feb 2024 05:49:53 +0200 (EET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6B16D68CA09 for ; Tue, 27 Feb 2024 05:49:46 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709005792; x=1740541792; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yaJWgwobo+HTtXCMhEeacFTmFEXMzCQxwVCD66jx83M=; b=bmr15QkdZPFKvjgffQZ+1AYN363ebxf9cAHogft/6chFihZ16LrxMAR2 +RX/huDMbu4OvELxj49UxVvLoyf/VvKGTvWeR/DKONQgTeju0jFgBGkEP zAufrbQdktb0M2YgXhvO8VTOERnL8xyeJER1mM77cEBme1V25GHvozvnH ZWU1G6jqwjqlrhFFHBRXYIiTsNUNA1PimnHoLOeC2ZL9mlIWi6QDDUkQU OzodOP/iFaF6Jhv6MtkhJTTT7aVCsEmPtNi8ZhWluvKW0tC+2ELiGlwEZ ndGUYiHk7MdcKO3tGZ3X4kIGeQglNVZiM+8qxjsRXw13BVLraLfOhNDQq w==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="14478515" X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="14478515" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 19:49:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="6862355" Received: from desktop-qn7n0nf.sh.intel.com (HELO localhost.localdomain) ([10.239.160.66]) by fmviesa010.fm.intel.com with ESMTP; 26 Feb 2024 19:49:37 -0800 From: tong1.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Feb 2024 11:48:35 +0800 Message-ID: <20240227034835.897-2-tong1.wu@intel.com> X-Mailer: git-send-email 2.41.0.windows.1 In-Reply-To: <20240227034835.897-1-tong1.wu@intel.com> References: <20240227034835.897-1-tong1.wu@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/vaapi_encode_h265: use is_reference to fill reference_pic_flag 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 Cc: Tong Wu 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: From: Tong Wu This codec supports FLAG_B_PICTURE_REFERENCES. We need to fill reference_pic_flag with pic->is_reference. Signed-off-by: Tong Wu --- libavcodec/vaapi_encode_h265.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index c4aabbf5ed..b5d3468152 100644 --- a/libavcodec/vaapi_encode_h265.c +++ b/libavcodec/vaapi_encode_h265.c @@ -949,22 +949,22 @@ static int vaapi_encode_h265_init_picture_params(AVCodecContext *avctx, case PICTURE_TYPE_IDR: vpic->pic_fields.bits.idr_pic_flag = 1; vpic->pic_fields.bits.coding_type = 1; - vpic->pic_fields.bits.reference_pic_flag = 1; + vpic->pic_fields.bits.reference_pic_flag = pic->is_reference; break; case PICTURE_TYPE_I: vpic->pic_fields.bits.idr_pic_flag = 0; vpic->pic_fields.bits.coding_type = 1; - vpic->pic_fields.bits.reference_pic_flag = 1; + vpic->pic_fields.bits.reference_pic_flag = pic->is_reference; break; case PICTURE_TYPE_P: vpic->pic_fields.bits.idr_pic_flag = 0; vpic->pic_fields.bits.coding_type = 2; - vpic->pic_fields.bits.reference_pic_flag = 1; + vpic->pic_fields.bits.reference_pic_flag = pic->is_reference; break; case PICTURE_TYPE_B: vpic->pic_fields.bits.idr_pic_flag = 0; vpic->pic_fields.bits.coding_type = 3; - vpic->pic_fields.bits.reference_pic_flag = 0; + vpic->pic_fields.bits.reference_pic_flag = pic->is_reference; break; default: av_assert0(0 && "invalid picture type"); -- 2.41.0.windows.1 _______________________________________________ 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".