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: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 03/13] avfilter/vf_colorspace: Remove redundant emms_c()
Date: Fri,  1 Sep 2023 00:22:25 +0200
Message-ID: <AS8P250MB0744F205A2E60ED39353ECDA8FE5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB0744AF0D34423E0BD48BF2438FE5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

It is not even clear what these emms_c() are supposed to achieve:
create_filtergraph() (where it may be called) does not call
ASM functions itself; it merely sets some function pointers.
Furthermore, there are no colorspacedsp functions using MMX
(checked by checkasm which does not use declare_new_emms()).
Finally, checking whether to issue emms_c() is overblown anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_colorspace.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 852dc11c6c..2a30434401 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -400,7 +400,7 @@ static int create_filtergraph(AVFilterContext *ctx,
     ColorSpaceContext *s = ctx->priv;
     const AVPixFmtDescriptor *in_desc  = av_pix_fmt_desc_get(in->format);
     const AVPixFmtDescriptor *out_desc = av_pix_fmt_desc_get(out->format);
-    int emms = 0, m, n, o, res, fmt_identical, redo_yuv2rgb = 0, redo_rgb2yuv = 0;
+    int m, n, o, res, fmt_identical, redo_yuv2rgb = 0, redo_rgb2yuv = 0;
 
 #define supported_depth(d) ((d) == 8 || (d) == 10 || (d) == 12)
 #define supported_subsampling(lcw, lch) \
@@ -494,7 +494,6 @@ static int create_filtergraph(AVFilterContext *ctx,
                         s->lrgb2lrgb_coeffs[m][n][o] = s->lrgb2lrgb_coeffs[m][n][0];
                 }
 
-            emms = 1;
         }
     }
 
@@ -542,7 +541,6 @@ static int create_filtergraph(AVFilterContext *ctx,
         res = fill_gamma_table(s);
         if (res < 0)
             return res;
-        emms = 1;
     }
 
     if (!s->in_lumacoef) {
@@ -625,7 +623,6 @@ static int create_filtergraph(AVFilterContext *ctx,
             av_assert2(s->yuv2rgb_coeffs[0][0][0] == s->yuv2rgb_coeffs[2][0][0]);
             s->yuv2rgb = s->dsp.yuv2rgb[(in_desc->comp[0].depth - 8) >> 1]
                                        [in_desc->log2_chroma_h + in_desc->log2_chroma_w];
-            emms = 1;
         }
 
         if (redo_rgb2yuv) {
@@ -656,7 +653,6 @@ static int create_filtergraph(AVFilterContext *ctx,
                                        [out_desc->log2_chroma_h + out_desc->log2_chroma_w];
             s->rgb2yuv_fsb = s->dsp.rgb2yuv_fsb[(out_desc->comp[0].depth - 8) >> 1]
                                        [out_desc->log2_chroma_h + out_desc->log2_chroma_w];
-            emms = 1;
         }
 
         if (s->yuv2yuv_fastmode && (redo_yuv2rgb || redo_rgb2yuv)) {
@@ -683,9 +679,6 @@ static int create_filtergraph(AVFilterContext *ctx,
         }
     }
 
-    if (emms)
-        emms_c();
-
     return 0;
 }
 
-- 
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".

  parent reply	other threads:[~2023-08-31 22:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 22:20 [FFmpeg-devel] [PATCH 01/13] avfilter: Remove unnecessary emms_c for ff_scene_sad_get_fn Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 02/13] avfilter/vf_gblur: Remove unnecessary emms_c() Andreas Rheinhardt
2023-08-31 22:22 ` Andreas Rheinhardt [this message]
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 04/13] avfilter/vf_bwdif: Remove obsolete emms_c() Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 05/13] avfilter/afir_template: Remove unnecessary emms_c() Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 06/13] avfilter/af_volume: " Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 07/13] avfilter/af_sofalizer: " Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 08/13] avfilter/af_headphone: " Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 09/13] avfilter/af_amultiply: " Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 10/13] avcodec/pcm: " Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 11/13] tests/checkasm/hevc_*: Avoid using declare_func_emms where possible Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 12/13] tests/checkasm/llvidencdsp: Don't use declare_func_emms Andreas Rheinhardt
2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 13/13] tests/checkasm/sw_scale: Avoid declare_func_emms where possible Andreas Rheinhardt
2023-08-31 22:26 ` [FFmpeg-devel] [PATCH 14/14] avutil/internal: Don't auto-include emms.h Andreas Rheinhardt
2023-09-03 11:42 ` [FFmpeg-devel] [PATCH 01/13] avfilter: Remove unnecessary emms_c for ff_scene_sad_get_fn 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=AS8P250MB0744F205A2E60ED39353ECDA8FE5A@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