[FFmpeg-cvslog] avcodec/thread: Remove ff_thread_get_format define

Andreas Rheinhardt git at videolan.org
Wed Sep 13 23:20:12 EEST 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Sep 10 14:12:16 2023 +0200| [6434e440039910f12f7c08072b7db3c5e99c3025] | committer: Andreas Rheinhardt

avcodec/thread: Remove ff_thread_get_format define

Unnecessary since FF_API_THREAD_SAFE_CALLBACKS is no more.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/av1dec.c     | 2 +-
 libavcodec/h264_slice.c | 2 +-
 libavcodec/hevcdec.c    | 2 +-
 libavcodec/mpeg12dec.c  | 2 +-
 libavcodec/proresdec2.c | 2 +-
 libavcodec/thread.h     | 2 --
 libavcodec/vp9.c        | 2 +-
 7 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index c523c457ec..39ccad5bf6 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -613,7 +613,7 @@ static int get_pixel_format(AVCodecContext *avctx)
     *fmtp++ = pix_fmt;
     *fmtp = AV_PIX_FMT_NONE;
 
-    ret = ff_thread_get_format(avctx, pix_fmts);
+    ret = ff_get_format(avctx, pix_fmts);
 
     /**
      * check if the HW accel is inited correctly. If not, return un-implemented.
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 6cd7bb8fe7..f3af345c99 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -922,7 +922,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
     for (int i = 0; pix_fmts[i] != AV_PIX_FMT_NONE; i++)
         if (pix_fmts[i] == h->avctx->pix_fmt && !force_callback)
             return pix_fmts[i];
-    return ff_thread_get_format(h->avctx, pix_fmts);
+    return ff_get_format(h->avctx, pix_fmts);
 }
 
 /* export coded and cropped frame dimensions to AVCodecContext */
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index ad22d0a30c..81b9c5e089 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -521,7 +521,7 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
     *fmt++ = sps->pix_fmt;
     *fmt = AV_PIX_FMT_NONE;
 
-    return ff_thread_get_format(s->avctx, pix_fmts);
+    return ff_get_format(s->avctx, pix_fmts);
 }
 
 static int set_sps(HEVCContext *s, const HEVCSPS *sps,
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 1accd07e9e..677360f954 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1168,7 +1168,7 @@ static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
     else
         pix_fmts = mpeg12_pixfmt_list_444;
 
-    return ff_thread_get_format(avctx, pix_fmts);
+    return ff_get_format(avctx, pix_fmts);
 }
 
 /* Call this function when we know all parameters.
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 2219971b85..3a5b753430 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -278,7 +278,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
         *fmtp++ = ctx->pix_fmt;
         *fmtp = AV_PIX_FMT_NONE;
 
-        if ((ret = ff_thread_get_format(avctx, pix_fmts)) < 0)
+        if ((ret = ff_get_format(avctx, pix_fmts)) < 0)
             return ret;
 
         avctx->pix_fmt = ret;
diff --git a/libavcodec/thread.h b/libavcodec/thread.h
index 88a14cfeb1..2c8c0cdb16 100644
--- a/libavcodec/thread.h
+++ b/libavcodec/thread.h
@@ -62,8 +62,6 @@ int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture,
  */
 void ff_thread_finish_setup(AVCodecContext *avctx);
 
-#define ff_thread_get_format ff_get_format
-
 /**
  * Wrapper around get_buffer() for frame-multithreaded codecs.
  * Call this function instead of ff_get_buffer(f).
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 89f7549ef0..3cc27aa812 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -250,7 +250,7 @@ static int update_size(AVCodecContext *avctx, int w, int h)
         *fmtp++ = s->pix_fmt;
         *fmtp = AV_PIX_FMT_NONE;
 
-        ret = ff_thread_get_format(avctx, pix_fmts);
+        ret = ff_get_format(avctx, pix_fmts);
         if (ret < 0)
             return ret;
 



More information about the ffmpeg-cvslog mailing list