From patchwork Thu May 2 00:41:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 48461 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f91:b0:1af:7bf4:b644 with SMTP id mm17csp80183pzb; Wed, 1 May 2024 17:42:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUFQTZMyijISsRzbGPfqIEi863w56VV3aAV2W5H9EHTwrKbpVQrYd3l2z2iWVWcguYinnpFyKA88/Ybe3iIp5vP03ciy208iGX/2w== X-Google-Smtp-Source: AGHT+IHN90lVn3BhZ/I8vRuoc2yPL976ct4kSMFgq6M0SFP198BDjMo7BhehiCSai4il2hruzNDn X-Received: by 2002:adf:fe03:0:b0:34c:54c8:3f2d with SMTP id n3-20020adffe03000000b0034c54c83f2dmr3066522wrr.69.1714610538164; Wed, 01 May 2024 17:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714610538; cv=none; d=google.com; s=arc-20160816; b=jjXNCMa8WFP5Hd9MdzP1QrfXH9hzISDwPmoHkl+PiaL14PB2sOwcIFwdMq5fbYpUQI u4q2Y8XvjZIUp+xh7gWLUQC/4qpBZQitza+xhBeELHLaqjcPLD6wYE42Db/H+Ci38i5f YL87yZ232iqA1QGqhP5kFHeMBUrO+zFqZsT7IrUCSXaWl+HAo33WkzxRnuWosnRTEVct iW3OAcvCR6XsZUKMj3bYIPWL5PizYtTB7pInuzK9c0YhaxhlZsPT3ZdSX/cBcZ7SZwQg TGowsRMQYkow6X64dkzuD1FpBb9Hyd0YCIb5f7Wj6Jm4sD7WltVJCkIcr5kK/WL/8mUl adeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=5U5L6Fn1vTBUZD/fGJHLFwqDZ2ccoRW4r0QQFIBT2t8=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=dOrytS0w0z+aX/KWwYJ1/jItDiPg0cd9lZgzvB8WmG8T75x80pGmAlYoxi9JC5RQ9R TFZVAM1yqOBDqjUV7tLjTalFJm1lkW9VevXH/BYNvLewr6JNopQHItVwjb4T132hEj/l tWJ3yFzPC5vx7zD/bbj88D9i79Cd/ZN1eYfOVG53G7uJbyAEzU1NVLwdL7rppm3Y9Xpl u56vxJQzDMDI2BciLKWy00QgILr5S6gLrPsw84Cpz/QvKvZAGhHZe9JvgHCJwGpoyVyC jprXEm3s5ZBB+/mtK2ymuug0e/GfBgux4Wwy3CM1pdbuGUyEzHJuE309jpXUCfEw3EjH Ja1Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="n/urv93J"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v6-20020a1709064e8600b00a58c55d46ebsi7170208eju.803.2024.05.01.17.42.05; Wed, 01 May 2024 17:42:18 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="n/urv93J"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D10F868D6EA; Thu, 2 May 2024 03:41:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 92CAE68D6EA for ; Thu, 2 May 2024 03:41:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7B3ACFF804 for ; Thu, 2 May 2024 00:41:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714610511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1sg9NpDdTuW5DX9Ee9JQvIxdrMyoOCql6W0pn1zrVyw=; b=n/urv93Jou3hmcz4b0zlY17X5wzI8UmTzaSREZfmPBvtdYapWd9TKNQseDrm/IVcSaJj9S muU5awL1DqXP89k23ZM0bmSNYFerCuMeV3gqterGkDebaEv9Zo2kieVA7tfWpoVpAoY3u+ AVLubnHT2wyYmP9nJqqu1kvPUTXcBduUQBSx9TOilViyH8oMZpGYcupMUtgpBrJev6RfP7 qbF/3vrBBidjFeZ3i1oEBHfcVi+h3Kzg6ehH54N25FWG6xv5jPUrHl4HEYtJLCEzm7d3Mk Teqn32fjYlQKutoZRaM4ZpwZRl9lb+YL4j8r7ZG3SAEY3fkf3/csLp+9aaChMA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 2 May 2024 02:41:44 +0200 Message-ID: <20240502004150.3627661-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 93YuzTcmA+O8 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;