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 CF2A14A0C3 for ; Mon, 20 May 2024 14:54:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3CF2568D1F9; Mon, 20 May 2024 17:54:09 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4689C68D180 for ; Mon, 20 May 2024 17:54:00 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716216846; x=1747752846; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KAG/yivTgGEHchufiYiAVJxZSI/iQ/DiNn32BP+e50Y=; b=nRapLtq16G8eiahX+P/os6ZudPEg8Zf0GqdNj43UwkYyES0wCl4+MiiZ XfnI39CImsPXQK/eykTs6efrTCXU7jdKfu79frgHVrs/mKDTKfbHp/sKb j+rcuzVP4geR+rWdTPVCA9iK3677lpIYTQycG8E68wB9i2CWdM83EOIj3 /V93+R8CjoflABkIXxqu8D3N/t0+LxCnqekTuAAiCduPzKbWlzD8idJ5V ap/9QsP0kP3Vnwfd8TAW6GckyCrwX9akuJsVfdzQaUqvQ9zpWsu1C4+6N abScZNIsARPLxXPz01r/DfMy1uFO9gMUOfcKkjPRRhJ5wbCBNKaIYF2iR Q==; X-CSE-ConnectionGUID: 5KfrfeDGQQinxqyV09TGiQ== X-CSE-MsgGUID: 7plwfAiHSV2sXSoZBuJO/Q== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12197245" X-IronPort-AV: E=Sophos;i="6.08,175,1712646000"; d="scan'208";a="12197245" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 07:53:58 -0700 X-CSE-ConnectionGUID: PKbylybwTFayM4Ps8AsOkg== X-CSE-MsgGUID: 0OUmmkexQ9qPYCLCHCijZw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,175,1712646000"; d="scan'208";a="55787866" Received: from unknown (HELO localhost.localdomain) ([10.239.160.66]) by fmviesa002.fm.intel.com with ESMTP; 20 May 2024 07:53:57 -0700 From: tong1.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Mon, 20 May 2024 22:52:12 +0800 Message-ID: <20240520145222.291-3-tong1.wu@intel.com> X-Mailer: git-send-email 2.41.0.windows.1 In-Reply-To: <20240520145222.291-1-tong1.wu@intel.com> References: <20240520145222.291-1-tong1.wu@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v9 03/13] avcodec/vaapi_encode: add picture type name to base 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 Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.h | 5 +++++ libavcodec/vaapi_encode.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/hw_base_encode.h b/libavcodec/hw_base_encode.h index 5272f2836d..a578db8c06 100644 --- a/libavcodec/hw_base_encode.h +++ b/libavcodec/hw_base_encode.h @@ -25,6 +25,11 @@ #define MAX_ASYNC_DEPTH 64 #define MAX_REFERENCE_LIST_NUM 2 +static inline const char *ff_hw_base_encode_get_pictype_name(const int type) { + const char * const picture_type_name[] = { "IDR", "I", "P", "B" }; + return picture_type_name[type]; +} + enum { PICTURE_TYPE_IDR = 0, PICTURE_TYPE_I = 1, diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index 9373512417..2d22e4bd85 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -38,8 +38,6 @@ const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[] = { NULL, }; -static const char * const picture_type_name[] = { "IDR", "I", "P", "B" }; - static int vaapi_encode_make_packed_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, int type, char *data, size_t bit_len) @@ -277,7 +275,7 @@ static int vaapi_encode_issue(AVCodecContext *avctx, av_log(avctx, AV_LOG_DEBUG, "Issuing encode for pic %"PRId64"/%"PRId64" " "as type %s.\n", pic->display_order, pic->encode_order, - picture_type_name[pic->type]); + ff_hw_base_encode_get_pictype_name(pic->type)); if (pic->nb_refs[0] == 0 && pic->nb_refs[1] == 0) { av_log(avctx, AV_LOG_DEBUG, "No reference pictures.\n"); } else { -- 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".