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 793F849C0F for ; Tue, 5 Mar 2024 07:58:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 04C7C68CB6E; Tue, 5 Mar 2024 09:58:53 +0200 (EET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4801568C90C for ; Tue, 5 Mar 2024 09:58: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=1709625532; x=1741161532; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mkw4fZpHl2JOBNbAmpzj9SyvYpvi6OQaW8paIOdFyWQ=; b=I1CVcK5nBy/BHcGajIOo1l0r62LEoCPeik/xHR5e7vJYv7heT5iRpLnX mH0ojjZQPVnZez+QogfDEIKPyqIOVF95PxiJqZZhnQNrzdOFoYU111EsP tlqnDFNpK9WcNw3XRVhfqoZjsoKbDPyfRkphwCeULefZDlkG8YJ10LY3u hYop8JKfq+sGfgzgVx5rCxjxdxTTSf8BQzDy1NrKPkI2VS4PU8/sgVd3w WaWLpd14lsECJoCCRnbV+/rQSLvakF8q04F84ggLS8u4bami89ugp2W1j LzlITsgE042MvtfXgTkuHWSAjBtCg+RpQyiOfTFRMQEpasrXU0Ig3+9a3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="7981583" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="7981583" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 23:58:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="9700034" Received: from desktop-qn7n0nf.sh.intel.com (HELO localhost.localdomain) ([10.239.160.66]) by orviesa007.jf.intel.com with ESMTP; 04 Mar 2024 23:58:43 -0800 From: tong1.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Tue, 5 Mar 2024 15:57:39 +0800 Message-ID: <20240305075740.1866-1-tong1.wu@intel.com> X-Mailer: git-send-email 2.41.0.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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".