* [FFmpeg-devel] [PATCH] avcodec/codec_par: remove alpha_mode (PR #20414)
@ 2025-09-03 11:47 James Almer via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: James Almer via ffmpeg-devel @ 2025-09-03 11:47 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: James Almer
PR #20414 opened by James Almer (jamrial)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20414
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20414.patch
It's not a value signaled at the container level, so it doesn't belong in this struct.
As this field is barely a day old, it can safely be removed.
>From 3c522d3a4d77b963f1b0b1b3e998166b94457a2c Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Wed, 3 Sep 2025 08:44:38 -0300
Subject: [PATCH] avcodec/codec_par: remove alpha_mode
It's not a value signaled at the container level, so it doesn't belong in this struct.
As this field is barely a day old, it can safely be removed.
Signed-off-by: James Almer <jamrial@gmail.com>
---
doc/APIchanges | 5 ++---
libavcodec/codec_par.c | 3 ---
libavcodec/codec_par.h | 5 -----
libavcodec/version.h | 2 +-
4 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index d69aaf2215..c3ba5c9447 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -16,9 +16,8 @@ API changes, most recent first:
2025-09-xx - xxxxxxxxxx - lavfi 11.7.100 - buffersink.h
Add av_buffersink_get_alpha_mode().
-2025-09-xx - xxxxxxxxxx - lavc 62.15.100 - avcodec.h codec_par.h
- Add AVCodecContext.alpha_mode, AVCodecParameters.alpha_mode, and
- AV_CODEC_CONFIG_ALPHA_MODE.
+2025-09-xx - xxxxxxxxxx - lavc 62.15.100 - avcodec.h
+ Add AVCodecContext.alpha_mode and AV_CODEC_CONFIG_ALPHA_MODE.
2025-09-xx - xxxxxxxxxx - lavfi 11.6.100 - avfilter.h
Add AVFilterLink.alpha_mode.
diff --git a/libavcodec/codec_par.c b/libavcodec/codec_par.c
index ddf349ceea..790ea01d10 100644
--- a/libavcodec/codec_par.c
+++ b/libavcodec/codec_par.c
@@ -51,7 +51,6 @@ static void codec_parameters_reset(AVCodecParameters *par)
par->framerate = (AVRational){ 0, 1 };
par->profile = AV_PROFILE_UNKNOWN;
par->level = AV_LEVEL_UNKNOWN;
- par->alpha_mode = AVALPHA_MODE_UNSPECIFIED;
}
AVCodecParameters *avcodec_parameters_alloc(void)
@@ -166,7 +165,6 @@ int avcodec_parameters_from_context(AVCodecParameters *par,
par->sample_aspect_ratio = codec->sample_aspect_ratio;
par->video_delay = codec->has_b_frames;
par->framerate = codec->framerate;
- par->alpha_mode = codec->alpha_mode;
break;
case AVMEDIA_TYPE_AUDIO:
par->format = codec->sample_fmt;
@@ -231,7 +229,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
codec->sample_aspect_ratio = par->sample_aspect_ratio;
codec->has_b_frames = par->video_delay;
codec->framerate = par->framerate;
- codec->alpha_mode = par->alpha_mode;
break;
case AVMEDIA_TYPE_AUDIO:
codec->sample_fmt = par->format;
diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h
index 2697605d4d..64b01f7e02 100644
--- a/libavcodec/codec_par.h
+++ b/libavcodec/codec_par.h
@@ -212,11 +212,6 @@ typedef struct AVCodecParameters {
* Audio only. Number of samples to skip after a discontinuity.
*/
int seek_preroll;
-
- /**
- * Video with alpha channel only. Alpha channel handling
- */
- enum AVAlphaMode alpha_mode;
} AVCodecParameters;
/**
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 9b8c267529..82a86fe9d9 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 15
+#define LIBAVCODEC_VERSION_MINOR 16
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-03 11:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-03 11:47 [FFmpeg-devel] [PATCH] avcodec/codec_par: remove alpha_mode (PR #20414) James Almer via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git