From patchwork Thu Aug 31 22:22:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43418 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:299e:b0:149:dfde:5c0a with SMTP id f30csp571422pzh; Thu, 31 Aug 2023 15:21:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOehVJwGw0pxGrDnKVNh2JZKiRIgCKrJEvxVIfD5Cr6qlUWPkanUGEX9uTHa2JpM5Wyd+S X-Received: by 2002:aa7:d6cb:0:b0:523:d8bf:3298 with SMTP id x11-20020aa7d6cb000000b00523d8bf3298mr585353edr.17.1693520506620; Thu, 31 Aug 2023 15:21:46 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t2-20020aa7d702000000b0052557cc5db0si1683946edq.217.2023.08.31.15.21.46; Thu, 31 Aug 2023 15:21:46 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=X9PapFtc; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7708A689975; Fri, 1 Sep 2023 01:21:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04olkn2057.outbound.protection.outlook.com [40.92.74.57]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5617568C7F1 for ; Fri, 1 Sep 2023 01:21:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XW/PIoyqD+a1mxiaTp+otPxLUJwFasfYisKTTIhj8ExeRZuLzSxDlND08vjtXMeKhfd/i4EwNv6O9yleKDqtH0jf1wvQ03tZRjoMjAr4xxnxJdMxj/f5nvZb8TVvOB6qKzWrVj+wmKCO/ik+2h9X8hQNMbovQ7WxtZ/vgVU4ngQKSTyacWi8UNSfvA8w0+nSFiEIzUiLxFcJUKlKFWle+Ub31Cpuuju74sYq9va+CVJd3apgi/KtTT2TZbfH9gsFbEsFyHwtFF8iLHo4BeYUcCvPZrbCH26XUNo9kVYMfTOu3QIZaTiZaQhHcZig3Dir7z3CWaoog94gDlaXlQut1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cYX6kLpX6AxmRJVY6nudDZlyH1l/FVyTCAlTRVbf0bI=; b=nYJ2ejV6fQk4ubMy8LIiZjPwFQGXSIFyxFeIVaQm8yoZTQbbER4j58/+yQ77FBB50JNWw80iWEMZsNsrQjtMd6h53ffpx2lKi4stajy0l0fEiuIy/VwCYZC1V+EWomyifA6634w2JPMtsMWt7GWzHVhLWWhcSv8F2dOxLVxue8c3y3JPVaOJpVVPYmDaWyfplQkdD54GhmkInXEzbLvytH4S0bJ/xgL1FjUZAf1Gg582LichHu5QJFUdFzlUYD76ZeBOJM6n0WJBHzAgyFYmZ9QRZVrvM5HaacsGk+kCZ0Gi2dqJcgnhzMIw94gkN71YDlMNTiACoJ94kR+T0jzu0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cYX6kLpX6AxmRJVY6nudDZlyH1l/FVyTCAlTRVbf0bI=; b=X9PapFtcddLRHFCMBqG93wbnHS5FThF/Y+ECciD/qVqDqwiKPTJhXoP8pBvISTyr2CS8JFYjqIeZQlsCQhTMLD+kMNVu7bcTmIjxS42OAUSFX0A4iIpyYQ7Qu/mfmeRy0u0EDBs/WAZauT4zMYMd9Iq1nMSBzSDR7pTuxmfuAUXjYUY91OTjvGBv4WUiIWkTH/LAI9awgrQrh1JAtkZjMzPP/nXnVm8T4xi4/WMQ7yPFYbjpCb1Umx6l8YbTyciqaRq3VHUgBCLySng7Dj0YUtBc6m/EoHPU57dcsom+/UpAmePuInkv7/x1s8OSdX9DiSWbrA12TIQjTgk0ViHy0g== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0254.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.21; Thu, 31 Aug 2023 22:21:28 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6699.034; Thu, 31 Aug 2023 22:21:28 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 1 Sep 2023 00:22:25 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Ihc1vsrOkpiCNwKVuzoq5IvuhOk8KsgJmI4A+l0GsqE=] X-ClientProxiedBy: ZR2P278CA0085.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:65::7) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230831222235.4160923-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0254:EE_ X-MS-Office365-Filtering-Correlation-Id: 15164413-6ecd-4cb7-3ec9-08dbaa709f09 X-MS-Exchange-SLBlob-MailProps: 70qbaZjg4msOH1kZ59XaVOI4Y8btiKHcycbh8B5gXy387YnWr2BpR5CualUGF4YINRWZSLZtn6W1ADG4JZyG1ffPEsMLHX8qT3+wEIwYzHDL/NCZIibVD5AsDDyWpGMhdZ4z57NvEkAmHhyRhSQwg0hQRoGsUvh4M93Q+tbyP4M+I4priJVIhVbqjJNpdRSMPXCIzj/NbYUOloc6Wgd+FIAyXQsTdfvItRGhzy/8Cul9otIFnLrE8cMMryskdmJW2Ik21H3bSuQpb1Qc4K+KopPEv2YJEt9a6A7KsETjVbJVDstzI1k+QeVUObPA+he7ZR4/E7o8RUsUq4dzxJgr85EtIV6CFhRr5sm4Fn0V59Aaq3cqqALTHovDiGlbpEWjbULKYL6eM/5vg8YeZzHeMUyLcZjvjC/txcB6yIl0Rj9D38Q3xycpA9S3dbPDyM9hWw5uycwQOREdc89xOZQaIrnCNi7sVbrMinpJNmDh9drDCse0Y6MF6ZchqT4D57NEwSXMa40mz8lmhFYXuwZjbmPoNOUQr0ADv9R0PXa8uWGWBsn5QM/zbpgPNXwHW+sLlZ4vkpHWvyG3gJHT7trowUahH1fV7iV4X/6Sc/bbMAovK6lyxFgLeOXgoEnDtQTWK7F9LXo/1Er52xOoJ5VTjPxydrgb7oaF6Sj80PdtlZeFXcOPoTHRBFYN1nUT1iWWCG9URQhYgO5nYlEwvtDxBLhRWW0lNOaucyosGMLAd/5KhXXQSKU5hA== X-Microsoft-Antispam: BCL:0; X-Micro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efD3i73OIVRCytfX9GBbvpHXpM3k2gXFZ6/EvVxuCxkD3n+s9YTG0Ims4Of6JTtGzs3WryqC+8JkLHPZenFGBQ2forwMUwTTZqSO0HWSQjmjVfH2kmDttYR9yYIcFlC51Qjl4CzGuoq/tMywlQiHvsByDvMgxUhUVneEgcZ/qY1DUiS95jcMkWVyPJdvwU0gHio3qzXqq+2pgeEWPeENmC2Cn9s0rla3kwoL9x6s5IDLOdPaAmCodC9UBb2QGjkPUa2Syi1/OAWkNXGyi/cfW2ZBo1VOzrNxAQPnSU2sKsMy3zcEeg/+SG17a5SwB3GLZyKNOq534JMUhAkIXb5kD+Agt9X5A6a1zvX4G6Ygevt+Nzi7Ysb1Kraosg4YmI2X+r+AKc29hRNN6y/lUOPhSxC2tvzGft/dwwGVwzK/Vgtbv3kSukb3kZ5kCnzpDdUGRVmnCLCysXRnDhhVN0s0sH6RWoMDu3gs4Qsg0PhWm73PARI7lXzHLzTMLcOb/TgqKK16jh7hiSBoY1nz5z6e3utdH6O12LPzp/7Bbc2Heu+0rY0IH40DheywRaSaY0RDEHW6IUTyWsxCHHCQMpCbs19+2PayZ+2Vu1htglpb1zg58ZUtsbholjIgPHw9jLNuTH/utFnTyfpK2IadMjq2Q42QD+IyPLml28PFHLZpEeBzsoj+lv9CZaSnmOOqYtxFP43lP7YuXq2Zx4JUEHOLGjmz2Kf0xRal78272jD/nsTLzKvIxIPd9E4B2qEgLBhB7IUIFp24J2xzb0z3MHr4t221g2oqVXNk+fdbqUUuuIjFIThAiPPZmoJrWjt82hef3rPQgEFrPQQTVmmT6VU01/FPf5k9tQjxX/arHk2y92d6gUGWnm/aXaqOUkWe7PC+xj21EZCESJV1+LxHfb9Hh X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15164413-6ecd-4cb7-3ec9-08dbaa709f09 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2023 22:21:28.6631 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2P250MB0254 Subject: [FFmpeg-devel] [PATCH 03/13] avfilter/vf_colorspace: Remove redundant emms_c() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: na0oXpfJeh3n 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 --- 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; }