[FFmpeg-devel] [PATCH 28/30] avutil: remove deprecated FF_API_H274_FILM_GRAIN_VCS

James Almer jamrial at gmail.com
Mon Feb 24 00:06:28 EET 2025


Deprecated since 2024-03-23.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/h2645_sei.c        | 11 -------
 libavutil/film_grain_params.h | 58 ++++++-----------------------------
 libavutil/version.h           |  1 -
 3 files changed, 9 insertions(+), 61 deletions(-)

diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c
index 2494daaf3c..c7950a4a45 100644
--- a/libavcodec/h2645_sei.c
+++ b/libavcodec/h2645_sei.c
@@ -875,17 +875,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         h274->blending_mode_id  = fgc->blending_mode_id;
         h274->log2_scale_factor = fgc->log2_scale_factor;
 
-#if FF_API_H274_FILM_GRAIN_VCS
-FF_DISABLE_DEPRECATION_WARNINGS
-        h274->bit_depth_luma   = fgp->bit_depth_luma;
-        h274->bit_depth_chroma = fgp->bit_depth_chroma;
-        h274->color_range      = fgp->color_range;
-        h274->color_primaries  = fgp->color_primaries;
-        h274->color_trc        = fgp->color_trc;
-        h274->color_space      = fgp->color_space;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         memcpy(&h274->component_model_present, &fgc->comp_model_present_flag,
                sizeof(h274->component_model_present));
         memcpy(&h274->num_intensity_intervals, &fgc->num_intensity_intervals,
diff --git a/libavutil/film_grain_params.h b/libavutil/film_grain_params.h
index ccacab88fe..7e8d333777 100644
--- a/libavutil/film_grain_params.h
+++ b/libavutil/film_grain_params.h
@@ -136,43 +136,6 @@ typedef struct AVFilmGrainH274Params {
      */
     int model_id;
 
-#if FF_API_H274_FILM_GRAIN_VCS
-  /**
-   * TODO: On this ABI bump, please also re-order the fields in
-   * AVFilmGrainParams (see below)
-   */
-
-  /**
-   * Specifies the bit depth used for the luma component.
-   *
-   * @deprecated use AVFilmGrainParams.bit_depth_luma.
-   */
-    attribute_deprecated
-    int bit_depth_luma;
-
-    /**
-     * Specifies the bit depth used for the chroma components.
-     *
-     * @deprecated use AVFilmGrainParams.bit_depth_chroma.
-     */
-    attribute_deprecated
-    int bit_depth_chroma;
-
-    /**
-     * Specifies the video signal characteristics.
-     *
-     * @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}.
-     */
-    attribute_deprecated
-    enum AVColorRange                  color_range;
-    attribute_deprecated
-    enum AVColorPrimaries              color_primaries;
-    attribute_deprecated
-    enum AVColorTransferCharacteristic color_trc;
-    attribute_deprecated
-    enum AVColorSpace                  color_space;
-#endif
-
     /**
      * Specifies the blending mode used to blend the simulated film grain
      * with the decoded images.
@@ -249,18 +212,6 @@ typedef struct AVFilmGrainParams {
      */
     uint64_t seed;
 
-    /**
-     * Additional fields may be added both here and in any structure included.
-     * If a codec's film grain structure differs slightly over another
-     * codec's, fields within may change meaning depending on the type.
-     *
-     * TODO: Move this to the end of the structure, at the next ABI bump.
-     */
-    union {
-        AVFilmGrainAOMParams aom;
-        AVFilmGrainH274Params h274;
-    } codec;
-
     /**
      * Intended display resolution. May be 0 if the codec does not specify
      * any restrictions.
@@ -287,6 +238,15 @@ typedef struct AVFilmGrainParams {
     int bit_depth_luma;
     int bit_depth_chroma;
 
+    /**
+     * Additional fields may be added both here and in any structure included.
+     * If a codec's film grain structure differs slightly over another
+     * codec's, fields within may change meaning depending on the type.
+     */
+    union {
+        AVFilmGrainAOMParams aom;
+        AVFilmGrainH274Params h274;
+    } codec;
 } AVFilmGrainParams;
 
 /**
diff --git a/libavutil/version.h b/libavutil/version.h
index 50466c34d9..443b4771f6 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_H274_FILM_GRAIN_VCS      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_MOD_UINTP2               (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_RISCV_FD_ZBA             (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_VULKAN_FIXED_QUEUES      (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1



More information about the ffmpeg-devel mailing list