From patchwork Tue Sep 24 09:29:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 15247 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id B34C94481A9 for ; Tue, 24 Sep 2019 12:32:54 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9043D68925C; Tue, 24 Sep 2019 12:32:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9F4B0688170 for ; Tue, 24 Sep 2019 12:32:47 +0300 (EEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2019 02:32:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,543,1559545200"; d="scan'208";a="195643321" Received: from icl-dev.sh.intel.com ([10.239.158.73]) by FMSMGA003.fm.intel.com with ESMTP; 24 Sep 2019 02:32:44 -0700 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Tue, 24 Sep 2019 17:29:01 +0800 Message-Id: <1569317341-17873-1-git-send-email-linjie.fu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH] lavc/vaapi_encode: remove consistency check of depth for each component X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Linjie Fu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Previously, consistency check of depth is introduced to make sure each component of the pixel format has the same depth. Since Y410(with a different depth in alpha channel) is supported for ICL+, this check should be removed to make the encoder work. Signed-off-by: Linjie Fu --- libavcodec/vaapi_encode.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index cb598d5..ba7a432 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -1236,14 +1236,6 @@ static av_cold int vaapi_encode_profile_entrypoint(AVCodecContext *avctx) ctx->input_frames->sw_format); return AVERROR(EINVAL); } - depth = desc->comp[0].depth; - for (i = 1; i < desc->nb_components; i++) { - if (desc->comp[i].depth != depth) { - av_log(avctx, AV_LOG_ERROR, "Invalid input pixfmt (%s).\n", - desc->name); - return AVERROR(EINVAL); - } - } av_log(avctx, AV_LOG_VERBOSE, "Input surface format is %s.\n", desc->name);