From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/thread: Remove ff_thread_get_format define
Date: Sun, 10 Sep 2023 14:53:31 +0200
Message-ID: <AS8P250MB0744C9BFADCC88C4CDA08AA28FF3A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB07443905E0022CBC602B1D658FF3A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
Unnecessary since FF_API_THREAD_SAFE_CALLBACKS is no more.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
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 9297860946..def58b2604 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;
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-09-10 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-10 12:31 [FFmpeg-devel] [PATCH 1/3] avcodec/av1dec: Pass AVCodecContext* as logctx in get_sw_pixel_format() Andreas Rheinhardt
2023-09-10 12:53 ` [FFmpeg-devel] [PATCH 2/3] avcodec/av1dec: Don't rely on AV_PIX_FMT_NONE == -1 Andreas Rheinhardt
2023-09-10 12:53 ` Andreas Rheinhardt [this message]
2023-09-13 0:22 ` [FFmpeg-devel] [PATCH 1/3] avcodec/av1dec: Pass AVCodecContext* as logctx in get_sw_pixel_format() Andreas Rheinhardt
2023-09-13 0:36 ` James Almer
2023-09-13 8:43 ` Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AS8P250MB0744C9BFADCC88C4CDA08AA28FF3A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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