From patchwork Fri Apr 24 16:31:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nelson Gomez X-Patchwork-Id: 19223 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id A157344A760 for ; Fri, 24 Apr 2020 19:32:22 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8232268C186; Fri, 24 Apr 2020 19:32:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 88A1268C168 for ; Fri, 24 Apr 2020 19:32:13 +0300 (EEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 7B25120B4749 for ; Fri, 24 Apr 2020 09:32:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7B25120B4749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1587745932; bh=QGHnO0oPEMabRdTqBeROwi1IYh7cXOTBqFOILMNHYQ8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XldhIDcXDqdbwd7LqA+t+rXT9GGrMP5j+gW01/j/wMUvMTXWH4AvguAVbkoT9oRQV fCLAbPQ+RuEKZJp9NuBEl1VTHyWVkoRip2nS8tzFRJ1PDkpDZVTRmnadq003GHp+OU JCmkG0DQMnJlGqSB0Nn6j79tILTIHISodGZl+Mq0= From: Nelson Gomez To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Apr 2020 09:31:41 -0700 Message-Id: <1587745903-74364-2-git-send-email-negomez@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1587745903-74364-1-git-send-email-negomez@linux.microsoft.com> References: <1587745903-74364-1-git-send-email-negomez@linux.microsoft.com> Subject: [FFmpeg-devel] [PATCH v2 1/3] swscale: make yuv2interleavedX more asm-friendly X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Nelson Gomez Extracting information from SwsContext in assembly is difficult, and rearranging SwsContext just for asm access didn't look good. These functions only need a couple of fields from it anyway, so just make them parameters in their own right. Signed-off-by: Nelson Gomez --- libswscale/output.c | 12 +++++------- libswscale/swscale_internal.h | 5 +++-- libswscale/vscale.c | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/libswscale/output.c b/libswscale/output.c index 68f43ffba3..2e5d6076ab 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -180,7 +180,7 @@ yuv2planeX_16_c_template(const int16_t *filter, int filterSize, } } -static void yuv2p016cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize, +static void yuv2p016cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest8, int chrDstW) { @@ -188,7 +188,7 @@ static void yuv2p016cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterS const int32_t **uSrc = (const int32_t **)chrUSrc; const int32_t **vSrc = (const int32_t **)chrVSrc; int shift = 15; - int big_endian = c->dstFormat == AV_PIX_FMT_P016BE; + int big_endian = dstFormat == AV_PIX_FMT_P016BE; int i, j; for (i = 0; i < chrDstW; i++) { @@ -402,12 +402,10 @@ static void yuv2plane1_8_c(const int16_t *src, uint8_t *dest, int dstW, } } -static void yuv2nv12cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize, +static void yuv2nv12cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest, int chrDstW) { - enum AVPixelFormat dstFormat = c->dstFormat; - const uint8_t *chrDither = c->chrDither8; int i; if (dstFormat == AV_PIX_FMT_NV12 || @@ -477,13 +475,13 @@ static void yuv2p010lX_c(const int16_t *filter, int filterSize, } } -static void yuv2p010cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize, +static void yuv2p010cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest8, int chrDstW) { uint16_t *dest = (uint16_t*)dest8; int shift = 17; - int big_endian = c->dstFormat == AV_PIX_FMT_P010BE; + int big_endian = dstFormat == AV_PIX_FMT_P010BE; int i, j; for (i = 0; i < chrDstW; i++) { diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 9dda53eead..42fd87e887 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -119,7 +119,8 @@ typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize, * Write one line of horizontally scaled chroma to interleaved output * with multi-point vertical scaling between input pixels. * - * @param c SWS scaling context + * @param dstFormat destination pixel format + * @param chrDither ordered dither array of type uint8_t and size 8 * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096] * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit * output, 19 bits for 16-bit output (in int32_t) @@ -130,7 +131,7 @@ typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize, * output, this is in uint16_t * @param dstW width of chroma planes */ -typedef void (*yuv2interleavedX_fn)(struct SwsContext *c, +typedef void (*yuv2interleavedX_fn)(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, diff --git a/libswscale/vscale.c b/libswscale/vscale.c index 72352dedb3..cac85921da 100644 --- a/libswscale/vscale.c +++ b/libswscale/vscale.c @@ -85,7 +85,7 @@ static int chr_planar_vscale(SwsContext *c, SwsFilterDescriptor *desc, int slice uint16_t *filter = inst->filter[0] + (inst->isMMX ? 0 : chrSliceY * inst->filter_size); if (c->yuv2nv12cX) { - ((yuv2interleavedX_fn)inst->pfn)(c, filter, inst->filter_size, (const int16_t**)src1, (const int16_t**)src2, dst1[0], dstW); + ((yuv2interleavedX_fn)inst->pfn)(c->dstFormat, c->chrDither8, filter, inst->filter_size, (const int16_t**)src1, (const int16_t**)src2, dst1[0], dstW); } else if (inst->filter_size == 1) { ((yuv2planar1_fn)inst->pfn)((const int16_t*)src1[0], dst1[0], dstW, c->chrDither8, 0); ((yuv2planar1_fn)inst->pfn)((const int16_t*)src2[0], dst2[0], dstW, c->chrDither8, 3); From patchwork Fri Apr 24 16:31:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nelson Gomez X-Patchwork-Id: 19221 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 5B34144A760 for ; Fri, 24 Apr 2020 19:32:20 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 435A468C179; Fri, 24 Apr 2020 19:32:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6E62168BFD1 for ; Fri, 24 Apr 2020 19:32:13 +0300 (EEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 9183D20B46F0 for ; Fri, 24 Apr 2020 09:32:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9183D20B46F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1587745932; bh=YeJo8ylxUIzTVyEcB393SQ4CcazVJyuu0P4n7+j2MWM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UHQasVAG02XaqZwhsGzwYFrsZ5Pkt2tfgYKkytmCLnufFicJWTqF47gWU6eCiImwI FjVHkUUq3tSFzJsrXrbEM4PQKaCmaVLwYSLZmhSKJsdrwzLgxMr4Wdgj9IyH7ODdeT s9j4merymtgbbeONmLbVbmCRU+rN6zd1S9zEmeKM= From: Nelson Gomez To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Apr 2020 09:31:42 -0700 Message-Id: <1587745903-74364-3-git-send-email-negomez@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1587745903-74364-1-git-send-email-negomez@linux.microsoft.com> References: <1587745903-74364-1-git-send-email-negomez@linux.microsoft.com> Subject: [FFmpeg-devel] [PATCH v2 2/3] swscale/x86/output: add AVX2 version of yuv2nv12cX X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Nelson Gomez 256 bits is just wide enough to fit all the operands needed to vectorize the software implementation, but AVX2 is needed to for a couple of instructions like cross-lane permutation. Output is bit-for-bit identical to C. Signed-off-by: Nelson Gomez --- libswscale/x86/output.asm | 124 +++++++++++++++++++++++++++++++++++++- libswscale/x86/swscale.c | 24 ++++++++ 2 files changed, 147 insertions(+), 1 deletion(-) diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm index db3e9934f8..7478e12403 100644 --- a/libswscale/x86/output.asm +++ b/libswscale/x86/output.asm @@ -2,6 +2,7 @@ ;* x86-optimized vertical line scaling functions ;* Copyright (c) 2011 Ronald S. Bultje ;* Kieran Kunhya +;* (c) 2020 Nelson Gomez ;* ;* This file is part of FFmpeg. ;* @@ -22,7 +23,7 @@ %include "libavutil/x86/x86util.asm" -SECTION_RODATA +SECTION_RODATA 32 minshort: times 8 dw 0x8000 yuv2yuvX_16_start: times 4 dd 0x4000 - 0x40000000 @@ -34,9 +35,20 @@ pd_4: times 4 dd 4 pd_4min0x40000:times 4 dd 4 - (0x40000) pw_16: times 8 dw 16 pw_32: times 8 dw 32 +pd_255: times 8 dd 255 pw_512: times 8 dw 512 pw_1024: times 8 dw 1024 +yuv2nv12_shuffle_mask: times 2 db 0, 4, 8, 12, \ + -1, -1, -1, -1, \ + -1, -1, -1, -1, \ + -1, -1, -1, -1 +yuv2nv21_shuffle_mask: times 2 db 4, 0, 12, 8, \ + -1, -1, -1, -1, \ + -1, -1, -1, -1, \ + -1, -1, -1, -1 +yuv2nv12_permute_mask: dd 0, 4, 1, 2, 3, 5, 6, 7 + SECTION .text ;----------------------------------------------------------------------------- @@ -423,3 +435,113 @@ yuv2plane1_fn 9, 5, 3 yuv2plane1_fn 10, 5, 3 yuv2plane1_fn 16, 5, 3 %endif + +%undef movsx + +;----------------------------------------------------------------------------- +; AVX2 yuv2nv12cX implementation +; +; void ff_yuv2nv12cX_avx2(enum AVPixelFormat format, const uint8_t *dither, +; const int16_t *filter, int filterSize, +; const int16_t **u, const int16_t **v, +; uint8_t *dst, int dstWidth) +; +; void ff_yuv2nv21cX_avx2(enum AVPixelFormat format, const uint8_t *dither, +; const int16_t *filter, int filterSize, +; const int16_t **u, const int16_t **v, +; uint8_t *dst, int dstWidth) +;----------------------------------------------------------------------------- + +%macro yuv2nv12cX_fn 1 +cglobal %1cX, 8, 11, 13, tmp1, dither, filter, filterSize, u, v, dst, dstWidth + + mov tmp1q, qword [ditherq] + movq xm0, tmp1q + ror tmp1q, 24 + movq xm1, tmp1q + + pmovzxbd m0, xm0 + pslld m0, m0, 12 ; ditherLo + pmovzxbd m1, xm1 + pslld m1, m1, 12 ; ditherHi + + pxor m9, m9 ; uint8_min dwords + mova m10, [pd_255] ; uint8_max dwords + mova m11, [%1_shuffle_mask] ; shuffle_mask + mova m12, [yuv2nv12_permute_mask] ; permute mask + + DEFINE_ARGS tmp1, tmp2, filter, filterSize, u, v, dst, dstWidth + + xor r8q, r8q + +nv12_outer_%1: + mova m2, m0 ; resultLo + mova m3, m1 ; resultHi + xor r9q, r9q + +nv12_inner_%1: + movsx r10d, word [filterq + (2 * r9q)] + movd xm4, r10d + vpbroadcastd m4, xm4 ; filter + + mov tmp1q, [uq + (gprsize * r9q)] + mova xm7, oword [tmp1q + 2 * r8q] + + mov tmp2q, [vq + (gprsize * r9q)] + mova xm8, oword [tmp2q + 2 * r8q] + + punpcklwd xm5, xm7, xm8 + pmovsxwd m5, xm5 ; multiplicandsLo + punpckhwd xm6, xm7, xm8 + pmovsxwd m6, xm6 ; multiplicandsHi + + pmulld m7, m5, m4 ; mulResultLo + pmulld m8, m6, m4 ; mulResultHi + paddd m2, m2, m7 ; resultLo += mulResultLo + paddd m3, m3, m8 ; resultHi += mulResultHi + + inc r9d + cmp r9d, filterSized + jl nv12_inner_%1 + ; end of inner loop + + psrad m2, m2, 19 + psrad m3, m3, 19 + + ; Vectorized av_clip_uint8 + pmaxsd m2, m2, m9 + pmaxsd m3, m3, m9 + pminsd m2, m2, m10 + pminsd m3, m3, m10 + + ; At this point we have clamped uint8s arranged in this order: + ; m2: u1 0 0 0 v1 0 0 0 [...] + ; m3: u5 0 0 0 v5 0 0 0 [...] + ; + ; First, we shuffle the bytes to make the bytes semi-contiguous. + ; AVX-2 doesn't have cross-lane shuffling, so we'll end up with: + ; m2: u1 v1 u2 v2 0 0 0 0 0 0 0 0 u3 v3 u4 v4 + ; m3: u5 v5 u6 v6 0 0 0 0 0 0 0 0 u7 v7 u8 v8 + pshufb m2, m2, m11 + pshufb m3, m3, m11 + + ; To fix the cross-lane shuffling issue, we'll then use cross-lane + ; permutation to combine the two segments + vpermd m2, m12, m2 + vpermd m3, m12, m3 + + ; Now we have the final results in the lower 8 bytes of each register + movq [dstq], xm2 + movq [dstq + 8], xm3 + + add r8d, 8 + add dstq, 16 + + cmp r8d, dstWidthd + jl nv12_outer_%1 + RET +%endmacro + +INIT_YMM avx2 +yuv2nv12cX_fn yuv2nv12 +yuv2nv12cX_fn yuv2nv21 diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 61110839ee..d0930b9656 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -380,6 +380,15 @@ INPUT_FUNCS(sse2); INPUT_FUNCS(ssse3); INPUT_FUNCS(avx); +#define YUV2NV_DECL(fmt, opt) \ +void ff_yuv2 ## fmt ## cX_ ## opt(enum AVPixelFormat format, const uint8_t *dither, \ + const int16_t *filter, int filterSize, \ + const int16_t **u, const int16_t **v, \ + uint8_t *dst, int dstWidth) + +YUV2NV_DECL(nv12, avx2); +YUV2NV_DECL(nv21, avx2); + av_cold void ff_sws_init_swscale_x86(SwsContext *c) { int cpu_flags = av_get_cpu_flags(); @@ -580,4 +589,19 @@ switch(c->dstBpc){ \ break; } } + + if (EXTERNAL_AVX2_FAST(cpu_flags)) { + switch (c->dstFormat) { + case AV_PIX_FMT_NV12: + case AV_PIX_FMT_NV24: + c->yuv2nv12cX = ff_yuv2nv12cX_avx2; + break; + case AV_PIX_FMT_NV21: + case AV_PIX_FMT_NV42: + c->yuv2nv12cX = ff_yuv2nv21cX_avx2; + break; + default: + break; + } + } } From patchwork Fri Apr 24 16:31:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nelson Gomez X-Patchwork-Id: 19222 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 31C8244A760 for ; Fri, 24 Apr 2020 19:32:21 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1806968C180; Fri, 24 Apr 2020 19:32:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E9B368C169 for ; Fri, 24 Apr 2020 19:32:13 +0300 (EEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id A8DA820B46FB for ; Fri, 24 Apr 2020 09:32:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A8DA820B46FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1587745932; bh=RY7xEIeswquhh3omPSjO5z3oBctiGjvrTycsEoQBsoI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lArWh6Y4Q/7eaQL20Ge0FICX8gkoddsVODX2bNcrbkEon9J+1sNkMcyOpADv8Vk0I TEgRYaycERVjuSZ4vuqBHprki2s2v5JWTXxegcs05P/FIthtLietag0ETRm6CAT5WN vP0eAwSYZe+FKx3LeMqxFIE5TmMxK+ZvhPd0qZ40= From: Nelson Gomez To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Apr 2020 09:31:43 -0700 Message-Id: <1587745903-74364-4-git-send-email-negomez@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1587745903-74364-1-git-send-email-negomez@linux.microsoft.com> References: <1587745903-74364-1-git-send-email-negomez@linux.microsoft.com> Subject: [FFmpeg-devel] [PATCH v2 3/3] swscale: cosmetic fixes X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Nelson Gomez Signed-off-by: Nelson Gomez --- libswscale/output.c | 13 ++++++++----- libswscale/swscale_internal.h | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libswscale/output.c b/libswscale/output.c index 2e5d6076ab..bddfaf16af 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -180,7 +180,8 @@ yuv2planeX_16_c_template(const int16_t *filter, int filterSize, } } -static void yuv2p016cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, +static void yuv2p016cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, + const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest8, int chrDstW) { @@ -402,9 +403,10 @@ static void yuv2plane1_8_c(const int16_t *src, uint8_t *dest, int dstW, } } -static void yuv2nv12cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, - const int16_t **chrUSrc, const int16_t **chrVSrc, - uint8_t *dest, int chrDstW) +static void yuv2nv12cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, + const int16_t *chrFilter, int chrFilterSize, + const int16_t **chrUSrc, const int16_t **chrVSrc, + uint8_t *dest, int chrDstW) { int i; @@ -475,7 +477,8 @@ static void yuv2p010lX_c(const int16_t *filter, int filterSize, } } -static void yuv2p010cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, +static void yuv2p010cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither, + const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest8, int chrDstW) { diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 42fd87e887..d87a9ad741 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -131,7 +131,8 @@ typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize, * output, this is in uint16_t * @param dstW width of chroma planes */ -typedef void (*yuv2interleavedX_fn)(enum AVPixelFormat dstFormat, const uint8_t *chrDither, +typedef void (*yuv2interleavedX_fn)(enum AVPixelFormat dstFormat, + const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc,