From patchwork Tue May 14 03:12:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Langdale X-Patchwork-Id: 13098 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 43346445B87 for ; Tue, 14 May 2019 06:12:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2CA396899F9; Tue, 14 May 2019 06:12:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.overt.org (mail.overt.org [157.230.92.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 580AF689729 for ; Tue, 14 May 2019 06:12:35 +0300 (EEST) Received: from authenticated-user (mail.overt.org [157.230.92.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.overt.org (Postfix) with ESMTPSA id EC887409B9; Mon, 13 May 2019 22:12:33 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=overt.org; s=mail; t=1557803554; bh=fAoDvKw8tOXdbuX1GEiH9cvaxQsB1ans3rL/acLIGxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iulCl+xlsAHX3iD/6A2BfoBY+3Cef9ToFckteiJSDoRfqWJf5EMwI73ApKBhLgB6L M1VWdd+Vi/GsQof0HNZ2prJbRUMdoBlg/L37vWQYdyBv7WYmkEsE7mUk1mwxCdNVnz cDHlPSDjgTYMHPVyr7JwzngUB26d2qJFP7MvYqYht7vvByPaonuivKbx12bVoXgGd1 6FU0G+XZGJNguQyLLnE9HxUlJ40N0ulmrkR0vv8Azv5Ow9fVMSeGP/oYAvhZVgsLe+ nT9zuhY+5k0xWp9xbuq3xlZXidCPdo+BKC5ZV00lC4oY96HJwfWq5zAYa4Q3sXnnbg hXIRhpVS/DFGg== From: Philip Langdale To: ffmpeg-devel@ffmpeg.org Date: Mon, 13 May 2019 20:12:21 -0700 Message-Id: <20190514031222.9760-3-philipl@overt.org> In-Reply-To: <20190514031222.9760-1-philipl@overt.org> References: <20190514031222.9760-1-philipl@overt.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avfilter/vf_scale_cuda: Add support for YUV444P16 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 Cc: Yogender Gupta , Philip Langdale Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This format is interesting because it's what you get for decoded 10/12bit HEVC 4:4:4. --- libavfilter/vf_scale_cuda.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index ecfd6a1c92..a833dcd1a4 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -43,7 +43,8 @@ static const enum AVPixelFormat supported_formats[] = { AV_PIX_FMT_NV12, AV_PIX_FMT_YUV444P, AV_PIX_FMT_P010, - AV_PIX_FMT_P016 + AV_PIX_FMT_P016, + AV_PIX_FMT_YUV444P16, }; #define DIV_UP(a, b) ( ((a) + (b) - 1) / (b) ) @@ -411,6 +412,20 @@ static int scalecuda_resize(AVFilterContext *ctx, out->data[0]+out->linesize[0]*out->height*2, out->width, out->height, out->linesize[0], 1); break; + case AV_PIX_FMT_YUV444P16: + call_resize_kernel(ctx, s->cu_func_ushort, 1, + in->data[0], in->width, in->height, in->linesize[0] / 2, + out->data[0], out->width, out->height, out->linesize[0] / 2, + 2); + call_resize_kernel(ctx, s->cu_func_ushort, 1, + in->data[1], in->width, in->height, in->linesize[1] / 2, + out->data[1], out->width, out->height, out->linesize[1] / 2, + 2); + call_resize_kernel(ctx, s->cu_func_ushort, 1, + in->data[2], in->width, in->height, in->linesize[2] / 2, + out->data[2], out->width, out->height, out->linesize[2] / 2, + 2); + break; case AV_PIX_FMT_NV12: call_resize_kernel(ctx, s->cu_func_uchar, 1, in->data[0], in->width, in->height, in->linesize[0],