From patchwork Tue Oct 8 22:50:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 52156 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:8b47:0:b0:48e:c0f8:d0de with SMTP id x7csp672394vql; Tue, 8 Oct 2024 20:06:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW21zwVL1dG+GH7NkTV7D/UZ6CcbNQrwAJ2yoh1CouahHWoogmmsDff9HGKeaZyipXHl9dUf9cz+uBQUGxZUD8x@gmail.com X-Google-Smtp-Source: AGHT+IGXmtTtiFAfvZBI3jq79l8COp9B8kj7yY/OUdi5iVeO0rGF+CxY3ICZfScdsBk9i2VSKV9U X-Received: by 2002:a17:907:94cf:b0:a99:4789:6ad3 with SMTP id a640c23a62f3a-a998d342102mr64032566b.59.1728443173090; Tue, 08 Oct 2024 20:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728443173; cv=none; d=google.com; s=arc-20240605; b=K5uZoW+tomoU9LFyIA9Rhx7rFKau/EVCiALmb2fX69AV51KSLR6KEczlli8i1JAt6u vGVHdyHBSmsW6VeRmyFtOsi/j0TRnr0uN4aAGwQ3fC44ZEwSiKUQi5KyrawgPn/0YmwJ I9f8Dd7TR5LDLufyz2i1UraM9GFCTF8S+B2nfxDZanFwIRCN/uFdEzmc3dwEPXc9Ocpk I/LkSleFe2dsl+vakFimmcRBlVvx64sQXGno///hedzAS6odTUqZ1GxMCAmXOKBAXBh1 Xs82CsIBU7Hv7+F1mm62WSwokhPrDPArw2MD4fnVqfbIBRguddy4+rYUlWh80yWpW++A IDyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=IURCurgIX8x+ij8yN32EscMTi8omBEtJcLAq+HgLerE=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=gUYOb3NVn1tL2d/Eie92jCBket6B14bv6oPJyywfSYu2LaWbuITRvRmBLlNiCW1gb4 h06OEmnnCAmi0W4lle9Ih5IZz2c8rhdzFmAvGxwi2CRedz7kTn2VTYtN6HsSprlQpznj 407/p17Q2e+wCwuASd7GPxFy7a7WsmJ6cR4LEl2I92rLv9fegjvjQBH501U8x40g3Yor meMgwVA3jqeYpktTPqYsYsyPXMlEpOxbc2JC07EFbVCP7hEGHRt7/eg6h0X77YO53+x0 eCj0ghgNI3y6D25UpgsDA9viXBa7Mhe9ctCqhe4Sp3iXa+iID9Ypy0JEz3dEVBaiLRWh L+Qg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=DpW6wsF5; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a995eecee71si313639566b.819.2024.10.08.20.06.12; Tue, 08 Oct 2024 20:06:13 -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=@gmail.com header.s=20230601 header.b=DpW6wsF5; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CAD1768DE3E; Wed, 9 Oct 2024 01:51:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8341768D56A for ; Wed, 9 Oct 2024 01:51:06 +0300 (EEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-20b833f9b35so54052525ad.2 for ; Tue, 08 Oct 2024 15:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728427864; x=1729032664; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QKBudreAA+o4OPrXfsPLGtfykO63dxuOf71acFgr0BM=; b=DpW6wsF5emki74njpBnMV5Ow3NYE+wYdi1hVncYxrGlRlFN220Pcmy23ButTW5Z0Bt DRS/zr/aFllt+t4lvhCyTmmoHWCj09FJVsk/CSJZz1JrnXcYhCua+dqEeLlAuH+nuOyI fTbhlemvwFkiUy/CK/IyRC86sKchDKNwBqbGfLGMSYsesbxx0fbvYlJaf0OuZpsKV65j dzCHIviVS9Zp6r8f70xBD8JCp1RS4sf7Q0pVB4PhE44j55fmF/rD5IhCzw55PKAbAvKj r9zqbFf8uOfxRGY0xmNFvwhkqKgzYmiTpfUbKY8wK2UNHo91gsX23vye0XhBg0zZc2t7 NJYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728427864; x=1729032664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QKBudreAA+o4OPrXfsPLGtfykO63dxuOf71acFgr0BM=; b=n3GYoK6te+fiQmqB4SkQlS04ZXuAwdulB9rNyKNnsFz8/Wl/1cyxmjs0AKJhaVkeJC VPvgZorotnnY87YDm0ID1PlJEB2VrD+4zH2y2EdVigpwpkB05qsXPP3FJCopJqBtrmwO QDR0+WiyMYHxR/66GnKShKYxTu4LY3b8HdEU8M7PSPv41zuWCxT3oSioJOjscJF+YgSV FwZz9bVMqdbh+sMrC+cBN+uBlk6wbro7upxu8ROzS4D58vTA6WwmtNwsBwsKzu544tou e7CnF/wY/jhWvxY7AECpDAn9UpeKhzKirumGJ9DN2gkYOv+QFUvY9N6wLTC3BXG8JZiq j4Qw== X-Gm-Message-State: AOJu0Yx9TFAGUgPhEbakOUgLNo2nGRn6sa4Obg8GRAhUdgd+BtaHzu02 krxpj6eyDADKqJbm5Poy1SI/STDFXWiYkg2EfX57sTD2zBkS1JuuV7yqJA== X-Received: by 2002:a17:903:41cf:b0:20b:af36:ea5 with SMTP id d9443c01a7336-20c6376e592mr6545525ad.18.1728427864212; Tue, 08 Oct 2024 15:51:04 -0700 (PDT) Received: from localhost.localdomain ([181.92.233.116]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c138afaa0sm60373855ad.4.2024.10.08.15.51.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 15:51:03 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 8 Oct 2024 19:50:25 -0300 Message-ID: <20241008225027.12209-20-jamrial@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008225027.12209-1-jamrial@gmail.com> References: <20241008225027.12209-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 20/21] avcodec: deprecate v308 de/encoder 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: vgja1Mtk8dqp The vyu444 pixel format was recently added, so this lavc workaround is no longer needed. Signed-off-by: James Almer --- libavcodec/allcodecs.c | 2 +- libavcodec/codec_desc.c | 2 +- libavcodec/codec_id.h | 2 +- libavcodec/v308dec.c | 2 ++ libavcodec/v308enc.c | 2 ++ libavformat/isom_tags.c | 2 +- libavformat/movenc.c | 2 +- libavformat/riff.c | 2 +- 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 356a78f6e0..19f7d63c16 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -345,9 +345,9 @@ extern const FFCodec ff_utvideo_decoder; extern const FFCodec ff_v210_encoder; extern const FFCodec ff_v210_decoder; extern const FFCodec ff_v210x_decoder; +#if FF_API_V408_CODECID extern const FFCodec ff_v308_encoder; extern const FFCodec ff_v308_decoder; -#if FF_API_V408_CODECID extern const FFCodec ff_v408_encoder; extern const FFCodec ff_v408_decoder; #endif diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 6018052215..0e9cd669d2 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1477,6 +1477,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("Pinnacle TARGA CineWave YUV16"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, }, +#if FF_API_V408_CODECID { .id = AV_CODEC_ID_V308, .type = AVMEDIA_TYPE_VIDEO, @@ -1484,7 +1485,6 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, }, -#if FF_API_V408_CODECID { .id = AV_CODEC_ID_V408, .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 0ab0f6761f..3608c4b856 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -254,8 +254,8 @@ enum AVCodecID { AV_CODEC_ID_012V, AV_CODEC_ID_AVUI, AV_CODEC_ID_TARGA_Y216, - AV_CODEC_ID_V308, #if FF_API_V408_CODECID + AV_CODEC_ID_V308, AV_CODEC_ID_V408, #endif AV_CODEC_ID_YUV4, diff --git a/libavcodec/v308dec.c b/libavcodec/v308dec.c index b591a79dd2..64876b7e5a 100644 --- a/libavcodec/v308dec.c +++ b/libavcodec/v308dec.c @@ -30,6 +30,8 @@ static av_cold int v308_decode_init(AVCodecContext *avctx) if (avctx->width & 1) av_log(avctx, AV_LOG_WARNING, "v308 requires width to be even.\n"); + av_log(avctx, AV_LOG_WARNING, "This decoder is deprecated and will be removed.\n"); + return 0; } diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c index 68f9c3310b..2941ba3f03 100644 --- a/libavcodec/v308enc.c +++ b/libavcodec/v308enc.c @@ -33,6 +33,8 @@ static av_cold int v308_encode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } + av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated and will be removed.\n"); + avctx->bits_per_coded_sample = 24; avctx->bit_rate = ff_guess_coded_bitrate(avctx); diff --git a/libavformat/isom_tags.c b/libavformat/isom_tags.c index d1b6b52db4..e999aa7fef 100644 --- a/libavformat/isom_tags.c +++ b/libavformat/isom_tags.c @@ -63,8 +63,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = { { AV_CODEC_ID_AVRP, MKTAG('S', 'U', 'D', 'S') }, /* Avid DS Uncompressed */ { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* uncompressed 10-bit 4:2:2 */ { AV_CODEC_ID_V210, MKTAG('b', 'x', 'y', '2') }, /* BOXX 10-bit 4:2:2 */ - { AV_CODEC_ID_V308, MKTAG('v', '3', '0', '8') }, /* uncompressed 8-bit 4:4:4 */ #if FF_API_V408_CODECID + { AV_CODEC_ID_V308, MKTAG('v', '3', '0', '8') }, /* uncompressed 8-bit 4:4:4 */ { AV_CODEC_ID_V408, MKTAG('v', '4', '0', '8') }, /* uncompressed 8-bit 4:4:4:4 */ #endif { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* uncompressed 10-bit 4:4:4 */ diff --git a/libavformat/movenc.c b/libavformat/movenc.c index ea5221c87b..8f47e85490 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2615,8 +2615,8 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex || (track->par->codec_id == AV_CODEC_ID_RAWVIDEO && track->par->format == AV_PIX_FMT_VYU444) || (track->par->codec_id == AV_CODEC_ID_RAWVIDEO && track->par->format == AV_PIX_FMT_UYVA) || (track->par->codec_id == AV_CODEC_ID_RAWVIDEO && track->par->format == AV_PIX_FMT_V30X) - || track->par->codec_id == AV_CODEC_ID_V308 #if FF_API_V408_CODECID + || track->par->codec_id == AV_CODEC_ID_V308 || track->par->codec_id == AV_CODEC_ID_V408 #endif || track->par->codec_id == AV_CODEC_ID_V410 diff --git a/libavformat/riff.c b/libavformat/riff.c index c1e48810b6..0f5682313e 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -305,8 +305,8 @@ const AVCodecTag ff_codec_bmp_tags[] = { { AV_CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, { AV_CODEC_ID_V210, MKTAG('C', '2', '1', '0') }, - { AV_CODEC_ID_V308, MKTAG('v', '3', '0', '8') }, #if FF_API_V408_CODECID + { AV_CODEC_ID_V308, MKTAG('v', '3', '0', '8') }, { AV_CODEC_ID_V408, MKTAG('v', '4', '0', '8') }, #endif { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') },