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 C63D849C1D for ; Tue, 5 Mar 2024 08:06:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E809D68CD59; Tue, 5 Mar 2024 10:06:01 +0200 (EET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D91668C80D for ; Tue, 5 Mar 2024 10:05:55 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709625960; x=1741161960; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mkw4fZpHl2JOBNbAmpzj9SyvYpvi6OQaW8paIOdFyWQ=; b=YyQb82L+rH23e3vr1Ni5FV/JTmbVdR468D1Tdezp3Mtuvdaydq5BN8pl 5UoGSs6okIYBQj0/p2kzalhn+LXvr3hgj0ebGaFyCgAamXMd3v9NWVxa+ 6fOVasFaOv+ww4fNVi9Lx8WoZxjbP7lvMoKiwABEOUuSg0/lTV4JwoS/x yCZGZ06K+Mmn3rBnrxsO3OzOFBPOmv7ogO2umSME9H13BLg2F7LL2xE9r SyLBgxafNzI3DfD81YtyB+Ty00SN9M4KjkshfUbo+q3hyF9mCCfboC8db qy1RgHcLQkKJBlZpG+nNh+09VQOMRf5+fUb1qfA+sluOoFoaDI+Ios71G Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="4282401" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="4282401" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 00:05:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="9704375" Received: from desktop-qn7n0nf.sh.intel.com (HELO localhost.localdomain) ([10.239.160.66]) by orviesa007.jf.intel.com with ESMTP; 05 Mar 2024 00:03:39 -0800 From: tong1.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Tue, 5 Mar 2024 16:02:37 +0800 Message-ID: <20240305080238.965-1-tong1.wu@intel.com> X-Mailer: git-send-email 2.41.0.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/2] avcodec/vaapi_encode_h264: 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 correctly fill the reference_pic_flag with is_reference variable instead of 0 for B frames. Signed-off-by: Tong Wu --- libavcodec/vaapi_encode_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 37df9103ae..4a738215c1 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -759,7 +759,7 @@ static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx, vpic->frame_num = hpic->frame_num; vpic->pic_fields.bits.idr_pic_flag = (pic->type == PICTURE_TYPE_IDR); - vpic->pic_fields.bits.reference_pic_flag = (pic->type != PICTURE_TYPE_B); + vpic->pic_fields.bits.reference_pic_flag = pic->is_reference; return 0; } -- 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".