From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/3] lavc: replace ff_thread_get_buffer() with ff_get_buffer()
Date: Fri, 8 Mar 2024 11:19:59 +0100
Message-ID: <GV1SPRMB0052C6557FA6BFB2F0A5CFDD8F272@GV1SPRMB0052.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <170989285192.7287.17016576053815588581@lain.khirnov.net>
Anton Khirnov:
> Quoting Andreas Rheinhardt (2024-03-08 11:03:18)
>> Anton Khirnov:
>>> ff_thread_get_buffer() has exactly the same semantics as
>>> ff_get_buffer(), except it is supposed to be used in frame-threaded
>>> decoders. Since the decoder instance knows whether frame threading is in
>>> use, there is no point in forcing decoder implementations to use a
>>> different function merely because they happen to support frame
>>> threading.
>>> ---
>>> libavcodec/aic.c | 4 ++--
>>> libavcodec/alac.c | 4 ++--
>>> libavcodec/av1dec.c | 2 +-
>>> libavcodec/avcodec_internal.h | 13 +++++++++++++
>>> libavcodec/bitpacked_dec.c | 4 ++--
>>> libavcodec/cfhd.c | 4 ++--
>>> libavcodec/cllc.c | 8 ++++----
>>> libavcodec/cri.c | 2 +-
>>> libavcodec/decode.c | 13 ++++++++++++-
>>> libavcodec/dnxhddec.c | 2 +-
>>> libavcodec/dvdec.c | 2 +-
>>> libavcodec/dxtory.c | 12 ++++++------
>>> libavcodec/dxv.c | 4 ++--
>>> libavcodec/exr.c | 2 +-
>>> libavcodec/flacdec.c | 4 ++--
>>> libavcodec/fraps.c | 4 ++--
>>> libavcodec/h264_slice.c | 2 +-
>>> libavcodec/hapdec.c | 4 ++--
>>> libavcodec/hdrdec.c | 2 +-
>>> libavcodec/hevcdec.c | 2 +-
>>> libavcodec/hqx.c | 4 ++--
>>> libavcodec/huffyuvdec.c | 4 ++--
>>> libavcodec/jpeg2000dec.c | 2 +-
>>> libavcodec/lagarith.c | 12 ++++++------
>>> libavcodec/lcldec.c | 4 ++--
>>> libavcodec/magicyuv.c | 2 +-
>>> libavcodec/mdec.c | 4 ++--
>>> libavcodec/notchlc.c | 2 +-
>>> libavcodec/photocd.c | 2 +-
>>> libavcodec/pixlet.c | 2 +-
>>> libavcodec/pngdec.c | 4 ++--
>>> libavcodec/proresdec2.c | 2 +-
>>> libavcodec/pthread_frame.c | 7 ++-----
>>> libavcodec/qoidec.c | 2 +-
>>> libavcodec/rtv1.c | 2 +-
>>> libavcodec/sheervideo.c | 4 ++--
>>> libavcodec/takdec.c | 5 +++--
>>> libavcodec/thread.h | 10 ----------
>>> libavcodec/tiff.c | 2 +-
>>> libavcodec/tta.c | 4 ++--
>>> libavcodec/utils.c | 5 -----
>>> libavcodec/utvideodec.c | 4 ++--
>>> libavcodec/v210dec.c | 4 ++--
>>> libavcodec/v410dec.c | 4 ++--
>>> libavcodec/vaapi_av1.c | 4 ++--
>>> libavcodec/vble.c | 4 ++--
>>> libavcodec/vmixdec.c | 2 +-
>>> libavcodec/vvc/vvc_refs.c | 4 ++--
>>> libavcodec/wbmpdec.c | 2 +-
>>> libavcodec/webp.c | 2 +-
>>> libavcodec/ylc.c | 4 ++--
>>> 51 files changed, 110 insertions(+), 103 deletions(-)
>>>
>>
>> -1: This adds avoidable runtime checks.
>
> What checks and why is that a problem?
>
It adds a runtime check to every call to ff_get_buffer() by every
decoder not supporting frame-threading (by checking whether
frame-threading is currently in use).
Every avoidable runtime check should always be avoided.
- Andreas
_______________________________________________
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:[~2024-03-08 10:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 8:27 [FFmpeg-devel] [PATCH 1/3] lavc/thread: move generic-layer API to avcodec_internal.h Anton Khirnov
2024-03-08 8:27 ` [FFmpeg-devel] [PATCH 2/3] lavc: replace ff_thread_get_buffer() with ff_get_buffer() Anton Khirnov
2024-03-08 10:03 ` Andreas Rheinhardt
2024-03-08 10:14 ` Anton Khirnov
2024-03-08 10:19 ` Andreas Rheinhardt [this message]
2024-03-08 10:21 ` Anton Khirnov
2024-03-08 10:44 ` Andreas Rheinhardt
2024-03-08 11:04 ` Anton Khirnov
2024-03-08 11:18 ` Andreas Rheinhardt
2024-03-08 13:19 ` Nicolas George
2024-03-08 13:28 ` Paul B Mahol
2024-03-08 15:09 ` Sean McGovern
2024-03-08 15:18 ` Nicolas George
2024-03-08 15:25 ` Sean McGovern
2024-03-08 15:21 ` Vittorio Giovara
2024-03-08 15:30 ` Paul B Mahol
2024-03-08 15:34 ` Sean McGovern
2024-03-08 15:37 ` Vittorio Giovara
2024-03-08 15:42 ` Sean McGovern
2024-03-08 15:46 ` Nicolas George
2024-03-08 15:55 ` Kieran Kunhya
2024-03-08 16:41 ` Nicolas George
2024-03-08 16:44 ` Kieran Kunhya
2024-03-08 16:49 ` Nicolas George
2024-03-08 17:01 ` Kieran Kunhya
2024-03-08 17:06 ` Vittorio Giovara
2024-03-08 16:11 ` Ronald S. Bultje
2024-03-08 16:39 ` Nicolas George
2024-03-08 14:43 ` Vittorio Giovara
2024-03-08 8:27 ` [FFmpeg-devel] [PATCH 3/3] lavc/thread.h: drop unnecessary includes Anton Khirnov
2024-03-09 23:26 ` [FFmpeg-devel] [PATCH 1/3] lavc/thread: move generic-layer API to avcodec_internal.h Michael Niedermayer
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=GV1SPRMB0052C6557FA6BFB2F0A5CFDD8F272@GV1SPRMB0052.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