From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 65B3746578 for ; Sun, 20 Aug 2023 15:11:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 270ED68C397; Sun, 20 Aug 2023 18:10:42 +0300 (EEST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6618268BBC9 for ; Sun, 20 Aug 2023 18:10:34 +0300 (EEST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-3fee7b7689dso8482085e9.0 for ; Sun, 20 Aug 2023 08:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kynesim-co-uk.20221208.gappssmtp.com; s=20221208; t=1692544233; x=1693149033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JZmCQcz4F7XEErtUOFNRRdghrc2DcoGMAKVcn02qyG0=; b=31kRVzYw4G7NXrYpav2OIch1822wXCRbpgHfWLtzsznfl6+z1hkf2VMj92JAHmbsOc j4M+VsBK03tkRnT2Hc0BjHEAU/xSbgqozS5zJ37LYnFvHb6uS7n3VW3TXgZ//zR6Of+Q PIY4Y3yxAHneJ7XY8osk/Cda7WbV3s/d4iQUBtaznrEEVb202fwYloWgh4WjAHxRbEyW nmMz0t1qQm/k971cRBBPsXOl7i9Aa2/vFPv9Mj+FxJj5O+6jzcfWkUHx1lA+80YTHZp1 0TV7ekWUS3t3zEE22CBiNYGzYhmn2U6F8fxtTQM7MCp1lXYELz2LhaQUEezw02R/DtbK 2gLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692544233; x=1693149033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JZmCQcz4F7XEErtUOFNRRdghrc2DcoGMAKVcn02qyG0=; b=YPoGoFTLVkYsv2K62PKw4J75+BJcgLYowX8tCZR3f2rCw6/u1E9BaIgS7WUY3A+vB3 QAQWP8dLOhAyTKrQCrntZyDiB/ZByAtuO9GHheYCn3t+xkpPNuEhkFb5xvyrnqyzSMAQ 75gXU41DzIvF98gib6wDLFU5pIk0euXN46Bglwo/mgF6a6IVZN769oqyt3RwTufjeSYB C1mgnNPmqiJ8h/o1ep5DklwZ2XJLffjlOv+ZZnLB4Mq9NpBz06cmoC2prMXGCGaDefvI j0oXN6w2yv0IsLiWXxtNM38mxGlROxPc9KozHj00idxdyc+0UClQVS5eLJtjHG9Xghnx oHuQ== X-Gm-Message-State: AOJu0Yzc72uzB8C0naf55bCG2LjrwOLUxykdJL0JrLvwSbSfPNd+ZB+6 2dzVtoCYuqq8FCXsXG63KiyjSFi+4R47prGR4no= X-Google-Smtp-Source: AGHT+IG/CgZ4YE1xvBjwH4mfVECNGqTjUUeqPt7126OVVmvEO1Ze0eJM140pkNIDZkuMuCujA0Wy6Q== X-Received: by 2002:adf:f6cc:0:b0:313:fbd0:9813 with SMTP id y12-20020adff6cc000000b00313fbd09813mr2813250wrp.28.1692544233787; Sun, 20 Aug 2023 08:10:33 -0700 (PDT) Received: from sucnaath.outer.uphall.net (cpc1-cmbg20-2-0-cust759.5-4.cable.virginm.net. [86.21.218.248]) by smtp.gmail.com with ESMTPSA id b4-20020adff904000000b003197c7d08ddsm9494476wrr.71.2023.08.20.08.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Aug 2023 08:10:33 -0700 (PDT) From: John Cox To: ffmpeg-devel@ffmpeg.org Date: Sun, 20 Aug 2023 15:10:18 +0000 Message-Id: <20230820151022.2204421-3-jc@kynesim.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230820151022.2204421-1-jc@kynesim.co.uk> References: <20230820151022.2204421-1-jc@kynesim.co.uk> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 2/6] swscale: Rename BGR24->YUV conversion functions as bgr... 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: John Cox Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Rename swscale conversion functions for converting BGR24 frames to YUV as bgr24toyuv12 rather than rgb24toyuv12 as that is just confusing and would be even more confusing with the addition of RGB24 converters. Signed-off-by: John Cox --- libswscale/bayer_template.c | 2 +- libswscale/rgb2rgb.c | 2 +- libswscale/rgb2rgb.h | 4 ++-- libswscale/rgb2rgb_template.c | 4 ++-- libswscale/swscale_unscaled.c | 2 +- libswscale/x86/rgb2rgb_template.c | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libswscale/bayer_template.c b/libswscale/bayer_template.c index 46b5a4984d..06d917c97f 100644 --- a/libswscale/bayer_template.c +++ b/libswscale/bayer_template.c @@ -188,7 +188,7 @@ * invoke ff_rgb24toyv12 for 2x2 pixels */ #define rgb24toyv12_2x2(src, dstY, dstU, dstV, luma_stride, src_stride, rgb2yuv) \ - ff_rgb24toyv12(src, dstY, dstV, dstU, 2, 2, luma_stride, 0, src_stride, rgb2yuv) + ff_bgr24toyv12(src, dstY, dstV, dstU, 2, 2, luma_stride, 0, src_stride, rgb2yuv) static void BAYER_RENAME(rgb24_copy)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int width) { diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index e98fdac8ea..8707917800 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -78,7 +78,7 @@ void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride); -void (*ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst, +void (*ff_bgr24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride, diff --git a/libswscale/rgb2rgb.h b/libswscale/rgb2rgb.h index f3951d523e..305b830920 100644 --- a/libswscale/rgb2rgb.h +++ b/libswscale/rgb2rgb.h @@ -76,7 +76,7 @@ void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size); void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size); void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size); -void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, +void ff_bgr24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride, int32_t *rgb2yuv); @@ -124,7 +124,7 @@ extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uin * Chrominance data is only taken from every second line, others are ignored. * FIXME: Write high quality version. */ -extern void (*ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, +extern void (*ff_bgr24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride, int32_t *rgb2yuv); diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 42c69801ba..8ef4a2cf5d 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -646,7 +646,7 @@ static inline void uyvytoyv12_c(const uint8_t *src, uint8_t *ydst, * others are ignored in the C version. * FIXME: Write HQ version. */ -void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, +void ff_bgr24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride, int32_t *rgb2yuv) { @@ -979,7 +979,7 @@ static av_cold void rgb2rgb_init_c(void) yuv422ptouyvy = yuv422ptouyvy_c; yuy2toyv12 = yuy2toyv12_c; planar2x = planar2x_c; - ff_rgb24toyv12 = ff_rgb24toyv12_c; + ff_bgr24toyv12 = ff_bgr24toyv12_c; interleaveBytes = interleaveBytes_c; deinterleaveBytes = deinterleaveBytes_c; vu9_to_vu12 = vu9_to_vu12_c; diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 9af2e7ecc3..32e0d7f63c 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -1641,7 +1641,7 @@ static int bgr24ToYv12Wrapper(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]) { - ff_rgb24toyv12( + ff_bgr24toyv12( src[0], dst[0] + srcSliceY * dstStride[0], dst[1] + (srcSliceY >> 1) * dstStride[1], diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index 4aba25dd51..dc2b4e205a 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -1544,7 +1544,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t * FIXME: Write HQ version. */ #if HAVE_7REGS -static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, +static inline void RENAME(bgr24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride, int32_t *rgb2yuv) @@ -1556,7 +1556,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ const x86_reg chromWidth= width>>1; if (height > 2) { - ff_rgb24toyv12_c(src, ydst, udst, vdst, width, 2, lumStride, chromStride, srcStride, rgb2yuv); + ff_bgr24toyv12_c(src, ydst, udst, vdst, width, 2, lumStride, chromStride, srcStride, rgb2yuv); src += 2*srcStride; ydst += 2*lumStride; udst += chromStride; @@ -1737,7 +1737,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ SFENCE" \n\t" :::"memory"); - ff_rgb24toyv12_c(src, ydst, udst, vdst, width, height-y, lumStride, chromStride, srcStride, rgb2yuv); + ff_bgr24toyv12_c(src, ydst, udst, vdst, width, height-y, lumStride, chromStride, srcStride, rgb2yuv); } #endif /* HAVE_7REGS */ #endif /* !COMPILE_TEMPLATE_SSE2 */ @@ -2434,7 +2434,7 @@ static av_cold void RENAME(rgb2rgb_init)(void) planar2x = RENAME(planar2x); #if HAVE_7REGS - ff_rgb24toyv12 = RENAME(rgb24toyv12); + ff_bgr24toyv12 = RENAME(bgr24toyv12); #endif /* HAVE_7REGS */ yuyvtoyuv420 = RENAME(yuyvtoyuv420); -- 2.39.2 _______________________________________________ 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".