Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: "Ronald S. Bultje" <rsbultje@gmail.com>,
	FFmpeg development discussions and patches
	<ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 05/41] avcodec/videodsp: Make ff_emulated_edge_mc_16 static
Date: Fri, 10 Jun 2022 18:07:43 +0200
Message-ID: <DB6PR0101MB2214C6EC9E5CE3EA8D66D0058FA69@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <CAEEMt2mrey2U92WG4xGeK_V4DQcLHBBs1FqTaaVgf-p9zrT1Ew@mail.gmail.com>

Ronald S. Bultje:
> Hi,
> 
> On Thu, Jun 9, 2022 at 7:56 PM Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> wrote:
> 
>> Only ff_emulated_edge_mc_8() is used outside of lavc/videodsp.c.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>> ---
>>  libavcodec/videodsp.c          | 4 ++++
>>  libavcodec/videodsp.h          | 1 -
>>  libavcodec/videodsp_template.c | 1 +
>>  3 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/videodsp.c b/libavcodec/videodsp.c
>> index 2198d46c15..02af046b81 100644
>> --- a/libavcodec/videodsp.c
>> +++ b/libavcodec/videodsp.c
>> @@ -25,11 +25,15 @@
>>  #include "videodsp.h"
>>
>>  #define BIT_DEPTH 8
>> +#define STATIC
>>  #include "videodsp_template.c"
>> +#undef STATIC
>>  #undef BIT_DEPTH
>>
>>  #define BIT_DEPTH 16
>> +#define STATIC static
>>  #include "videodsp_template.c"
>> +#undef STATIC
>>  #undef BIT_DEPTH
>>
>>  static void just_return(uint8_t *buf, ptrdiff_t stride, int h)
>>
> [..]
> 
>> diff --git a/libavcodec/videodsp_template.c
>> b/libavcodec/videodsp_template.c
>> index 55123a5844..8bc3290248 100644
>> --- a/libavcodec/videodsp_template.c
>> +++ b/libavcodec/videodsp_template.c
>> @@ -20,6 +20,7 @@
>>   */
>>
>>  #include "bit_depth_template.c"
>> +STATIC
>>  void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
>>                                 ptrdiff_t buf_linesize,
>>                                 ptrdiff_t src_linesize,
>> --
>> 2.34.1
>>
> 
> This splits the "staticness" over two places (i.e. to understand what
> STATIC means and/or why it exists, you have to look at two places), and
> also doesn't explain why we need "variable staticness" (i.e. one being
> static, but not the other one).
> 
> Maybe you could use the following:
> 
> #if BIT_DEPTH != 8 // we make a call to the 8-bit version in
> $fill_me_in_here$
> static
> #endif
> void FUNC(ff_..
> 
> That way the meaning of STATIC is not obfuscated (I know, STATIC should be
> obvious, but it's still an indirection) and the reasoning is included also.
> 
> Ronald
> 

I'll change it if you prefer it that way.

- 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".

  reply	other threads:[~2022-06-10 16:08 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 23:15 [FFmpeg-devel] [PATCH 00/41] Stop including superseded functions for x64 Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 01/41] avcodec/x86/qpeldsp: Remove unused ff_put_no_rnd_pixels16_l2_3dnow Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 02/41] avcodec/x86/hevcdsp_init: Remove unnecessary inclusion of get_bits.h Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 03/41] avcodec/hevcdec: Make ff_hevc_pel_weight static Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 04/41] avcodec/v4l2_m2m: Remove unused ff_v4l2_m2m_codec_full_reinit Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 05/41] avcodec/videodsp: Make ff_emulated_edge_mc_16 static Andreas Rheinhardt
2022-06-10 15:50   ` Ronald S. Bultje
2022-06-10 16:07     ` Andreas Rheinhardt [this message]
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 06/41] avcodec/x86/fpel: Remove unused ff_avg_pixels4_mmx Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 07/41] avcodec/x86/rv34dsp: Remove unused ff_rv34_idct_dc_mmxext Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 08/41] avcodec/x86/h264_qpel_8bit: Remove unused function Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 09/41] avcodec/x86/vc1dsp_init: Disable overridden functions on x64 Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 10/41] avcodec/x86/ac3dsp_init: " Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 11/41] avcodec/x86/audiodsp_init: " Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 12/41] avcodec/x86/diracdsp_init: " Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 13/41] avcodec/x86/mpegvideoenc: " Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 14/41] avcodec/x86/fdct: " Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 15/41] avcodec/x86/hevcdsp_init: " Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 16/41] avcodec/x86/rv40dsp_init: " Andreas Rheinhardt
2022-06-09 23:54 ` [FFmpeg-devel] [PATCH 17/41] avcodec/x86/cavsdsp: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 18/41] avcodec/x86/h264_intrapred_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 19/41] avfilter/x86/vf_noise: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 20/41] avcodec/x86/me_cmp: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 21/41] avcodec/x86/mpegvideoencdsp: Disable ff_pix_norm1_mmx " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 22/41] avcodec/x86/h264dsp_init: Disable overridden functions " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 23/41] avcodec/x86/sbrdsp_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 24/41] avcodec/x86/idctdsp_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 25/41] avcodec/x86/blockdsp_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 26/41] avcodec/x86/pixblockdsp_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 27/41] avcodec/x86/lossless_audiodsp_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 28/41] avcodec/x86/svq1enc_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 29/41] avcodec/x86/fmtconvert_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 30/41] avcodec/x86/hpeldsp_vp3_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 31/41] avcodec/x86/hpeldsp_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 32/41] avcodec/x86/h264_qpel: Make functions only used here static Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 33/41] avcodec/x86/h264_qpel: Disable overridden functions on x64 Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 34/41] avcodec/x86/h264chroma_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 35/41] swresample/x86/audio_convert_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 36/41] swresample/x86/rematrix_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 37/41] swscale/x86/rgb2rgb: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 38/41] swscale/x86/yuv2rgb: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 39/41] swscale/x86/swscale: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 40/41] avfilter/x86/vf_eq_init: " Andreas Rheinhardt
2022-06-09 23:55 ` [FFmpeg-devel] [PATCH 41/41] avutil/x86/pixelutils_init: " Andreas Rheinhardt
2022-06-11 20:14 ` [FFmpeg-devel] [PATCH 00/41] Stop including superseded functions for x64 Andreas Rheinhardt
2022-06-20 11:16   ` 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=DB6PR0101MB2214C6EC9E5CE3EA8D66D0058FA69@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=rsbultje@gmail.com \
    /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