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 4716F49076 for ; Thu, 2 May 2024 00:57:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7196568D77E; Thu, 2 May 2024 03:57:03 +0300 (EEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8773768D768 for ; Thu, 2 May 2024 03:56:57 +0300 (EEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1e3c3aa8938so48710725ad.1 for ; Wed, 01 May 2024 17:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714611415; x=1715216215; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=Nu1EHd7mCtbrrz4BZx/1kDN00lo1QVvvWrCfBvb1uqc=; b=ZFXSOd/lDqXTqomI8oY7Or+SYvqSBmMm247RLmjsHW+qAHqzgo9egOkyPwAn5b5ieI 1IrqWM3QrmVgJCcZy2IZp5yhgmZ2LlT7zOxXgSn+gJiAGkITSbu72g9GVcbZkZxSwxab YRWnmZVf3N8NBr4EgtXmokZ6Y44M9tZpolXuYc9S2UWkpRWas4u/5m6ePt7jLe/dYMEn hWn8gjtSkevKW/PmX8DFE9RDmJ1JNxarraEfmsFLzEgGhI82++wo6Pp8FB3ZlMCLVQHp NjUN6pcZz3Wf3ihuc+KGTHUQNz9OK2OjZ+KEdJgnKG6a70UmXHXaoyvGw7Zq8yuBxX6D Gyag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714611415; x=1715216215; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Nu1EHd7mCtbrrz4BZx/1kDN00lo1QVvvWrCfBvb1uqc=; b=Bi+2u/Ot6PdG6NxgcArknoTMjljiq/LPjIEY9q8Y1c51INjpgNQwJdpbTtZoSoQ1yd /2LvnqCHyyqzBNO3LU35ea6KZ/hkXRdlRosU15mGa0990jSO38bbEnGAgnlA7N6JVE5q N8vKBGsKgHJ8sVrMBQqLPKrjhlaNI6StVe9LKHcryeoZJFY+w7bc2vWSsjRlRLtKvn5E bOmhlLd7oVbC5qJlo1o9ZFjnPZvbCzozTl48icLY+LaIfwrPP59L0jSrjOqg+PZiVAMd 05Kl4cZlls49oylGYCXU3lUZ1nZBndQRiObfthpeFoRRMGD08rLMmGjHdBejblfaFFh/ U7YA== X-Gm-Message-State: AOJu0YwdswKVvtlFuObe4KgOi4/46IVXlE2BkC4Hhx9jK3VqEQxLdD01 6AhsEGCnxr8pq2VOSUcSiNTuFSd3KUkijgerFm/5enteTRzXnXa9CtImgA== X-Google-Smtp-Source: AGHT+IEISZ4EPlwx1tS9EKHCMh9iv82lDN/rHwSphK56+XcMLCxUCbbKzlMEyb+fz7eBiOcxsNeyxA== X-Received: by 2002:a17:902:dac4:b0:1ec:2bca:5aa8 with SMTP id q4-20020a170902dac400b001ec2bca5aa8mr4373459plx.6.1714611415315; Wed, 01 May 2024 17:56:55 -0700 (PDT) Received: from [192.168.0.10] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id x2-20020a170902820200b001e042dc5202sm24740274pln.80.2024.05.01.17.56.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 May 2024 17:56:54 -0700 (PDT) Message-ID: <8baf5a87-e2d9-4c4e-9cbe-6d86471bd1ce@gmail.com> Date: Wed, 1 May 2024 21:56:53 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20240502004150.3627661-1-michael@niedermayer.cc> Content-Language: en-US From: James Almer In-Reply-To: <20240502004150.3627661-1-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 1/7] avcodec/av1dec: bit_depth cannot be another values than 8, 10, 12 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 5/1/2024 9:41 PM, Michael Niedermayer wrote: > Fixes: CID1544265 Logically dead code > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/av1dec.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c > index 79a30a114da..4f9222cca27 100644 > --- a/libavcodec/av1dec.c > +++ b/libavcodec/av1dec.c > @@ -493,7 +493,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx, > else if (bit_depth == 12) > pix_fmt = AV_PIX_FMT_YUV444P12; > else > - av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); > + av_assert0(0); > } else if (seq->color_config.subsampling_x == 1 && > seq->color_config.subsampling_y == 0) { > if (bit_depth == 8) > @@ -503,7 +503,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx, > else if (bit_depth == 12) > pix_fmt = AV_PIX_FMT_YUV422P12; > else > - av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); > + av_assert0(0); > } else if (seq->color_config.subsampling_x == 1 && > seq->color_config.subsampling_y == 1) { > if (bit_depth == 8) > @@ -513,7 +513,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx, > else if (bit_depth == 12) > pix_fmt = AV_PIX_FMT_YUV420P12; > else > - av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); > + av_assert0(0); > } > } else { > if (bit_depth == 8) > @@ -523,7 +523,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx, > else if (bit_depth == 12) > pix_fmt = AV_PIX_FMT_GRAY12; > else > - av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); > + av_assert0(0); > } > > return pix_fmt; LGTM. Can you change bit_depth into an int while at it? no reason for it to be uint8_t as a scalar. _______________________________________________ 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".