[FFmpeg-cvslog] avcodec: Remove deprecated stat-bits fields

Andreas Rheinhardt git at videolan.org
Wed Apr 28 00:14:21 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Feb 25 18:43:15 2021 +0100| [6cf0cb8935f515a7b5f79d2e3cf02bd0764943bf] | committer: James Almer

avcodec: Remove deprecated stat-bits fields

Deprecated in 16216b713f9a21865cc07993961cf5d0ece24916.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6cf0cb8935f515a7b5f79d2e3cf02bd0764943bf
---

 doc/codecs.texi            |  9 ---------
 libavcodec/avcodec.h       | 24 ------------------------
 libavcodec/mpegvideo_enc.c | 20 --------------------
 libavcodec/options_table.h | 11 -----------
 libavcodec/snowenc.c       |  8 --------
 libavcodec/version.h       |  3 ---
 6 files changed, 75 deletions(-)

diff --git a/doc/codecs.texi b/doc/codecs.texi
index 9add7629cf..4a481dd5bf 100644
--- a/doc/codecs.texi
+++ b/doc/codecs.texi
@@ -150,15 +150,6 @@ Set strategy to choose between I/P/B-frames.
 @item ps @var{integer} (@emph{encoding,video})
 Set RTP payload size in bytes.
 
- at item mv_bits @var{integer}
- at item header_bits @var{integer}
- at item i_tex_bits @var{integer}
- at item p_tex_bits @var{integer}
- at item i_count @var{integer}
- at item p_count @var{integer}
- at item skip_count @var{integer}
- at item misc_bits @var{integer}
- at item frame_bits @var{integer}
 @item codec_tag @var{integer}
 @item bug @var{flags} (@emph{decoding,video})
 Workaround not auto detected encoder bugs.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 81a18e2cde..ee2350bcb0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1525,30 +1525,6 @@ typedef struct AVCodecContext {
                             /* headers inside the transmitted RTP payload.  */
 #endif
 
-#if FF_API_STAT_BITS
-    /* statistics, used for 2-pass encoding */
-    attribute_deprecated
-    int mv_bits;
-    attribute_deprecated
-    int header_bits;
-    attribute_deprecated
-    int i_tex_bits;
-    attribute_deprecated
-    int p_tex_bits;
-    attribute_deprecated
-    int i_count;
-    attribute_deprecated
-    int p_count;
-    attribute_deprecated
-    int skip_count;
-    attribute_deprecated
-    int misc_bits;
-
-    /** @deprecated this field is unused */
-    attribute_deprecated
-    int frame_bits;
-#endif
-
     /**
      * pass1 encoding statistics output buffer
      * - encoding: Set by libavcodec.
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index d4ddd41035..7d83735e96 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1841,20 +1841,6 @@ vbv_retry:
         if (ret < 0)
             return -1;
 
-#if FF_API_STAT_BITS
-FF_DISABLE_DEPRECATION_WARNINGS
-        avctx->header_bits = s->header_bits;
-        avctx->mv_bits     = s->mv_bits;
-        avctx->misc_bits   = s->misc_bits;
-        avctx->i_tex_bits  = s->i_tex_bits;
-        avctx->p_tex_bits  = s->p_tex_bits;
-        avctx->i_count     = s->i_count;
-        // FIXME f/b_count in avctx
-        avctx->p_count     = s->mb_num - s->i_count - s->skip_count;
-        avctx->skip_count  = s->skip_count;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         frame_end(s);
 
        if ((CONFIG_MJPEG_ENCODER || CONFIG_AMV_ENCODER) && s->out_format == FMT_MJPEG)
@@ -2006,12 +1992,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 #endif
         }
         s->total_bits     += s->frame_bits;
-#if FF_API_STAT_BITS
-FF_DISABLE_DEPRECATION_WARNINGS
-        avctx->frame_bits  = s->frame_bits;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 
         pkt->pts = s->current_picture.f->pts;
         if (!s->low_delay && s->pict_type != AV_PICTURE_TYPE_B) {
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 956132437a..b3d8a79f11 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -105,17 +105,6 @@ static const AVOption avcodec_options[] = {
 {"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, V|E},
 {"ps", "RTP payload size in bytes", OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
 #endif
-#if FF_API_STAT_BITS
-{"mv_bits", NULL, OFFSET(mv_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"header_bits", NULL, OFFSET(header_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"i_tex_bits", NULL, OFFSET(i_tex_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"p_tex_bits", NULL, OFFSET(p_tex_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"i_count", NULL, OFFSET(i_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"p_count", NULL, OFFSET(p_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"skip_count", NULL, OFFSET(skip_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"misc_bits", NULL, OFFSET(misc_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-{"frame_bits", NULL, OFFSET(frame_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
-#endif
 {"codec_tag", NULL, OFFSET(codec_tag), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
 {"bug", "work around not autodetected encoder bugs", OFFSET(workaround_bugs), AV_OPT_TYPE_FLAGS, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"},
 {"autodetect", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"},
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 16d2b7c302..1c1080ac76 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1890,14 +1890,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
     if(avctx->flags&AV_CODEC_FLAG_PASS1)
         ff_write_pass1_stats(&s->m);
     s->m.last_pict_type = s->m.pict_type;
-#if FF_API_STAT_BITS
-FF_DISABLE_DEPRECATION_WARNINGS
-    avctx->frame_bits = s->m.frame_bits;
-    avctx->mv_bits = s->m.mv_bits;
-    avctx->misc_bits = s->m.misc_bits;
-    avctx->p_tex_bits = s->m.p_tex_bits;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     emms_c();
 
diff --git a/libavcodec/version.h b/libavcodec/version.h
index dfa04d7fc3..fbb4bf1c45 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -69,9 +69,6 @@
 #ifndef FF_API_CODER_TYPE
 #define FF_API_CODER_TYPE        (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
-#ifndef FF_API_STAT_BITS
-#define FF_API_STAT_BITS         (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
 #ifndef FF_API_PRIVATE_OPT
 #define FF_API_PRIVATE_OPT      (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif



More information about the ffmpeg-cvslog mailing list