From patchwork Sat May 11 16:56:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 13071 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 6C42A447DD5 for ; Sat, 11 May 2019 19:56:17 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 493DB68A973; Sat, 11 May 2019 19:56:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F48E680924 for ; Sat, 11 May 2019 19:56:10 +0300 (EEST) Received: from localhost (213-47-41-20.cable.dynamic.surfer.at [213.47.41.20]) (Authenticated sender: michael@niedermayer.cc) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 34896200008 for ; Sat, 11 May 2019 16:56:05 +0000 (UTC) Date: Sat, 11 May 2019 18:56:05 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20190511165605.GF3501@michaelspb> References: <20190510055912.23140-1-philipl@overt.org> <20190511154041.GE3501@michaelspb> MIME-Version: 1.0 In-Reply-To: <20190511154041.GE3501@michaelspb> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [FFmpeg-devel] [PATCH] swscale: Add support for NV24 and NV42 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Sat, May 11, 2019 at 05:40:41PM +0200, Michael Niedermayer wrote: > On Thu, May 09, 2019 at 10:59:12PM -0700, Philip Langdale wrote: > > I don't think this is terribly useful, as the only thing out there that > > can even handle NV24 content is VDPAU and the only time you have to > > deal with it is when doing VDPAU OpenGL interop where swscale is > > irrelevant. In the other cases you can use YV24 (YUV444P). > > > > But anyway, I was asked to do this for the sake of completeness. > > > > The implementation is pretty straight-forward. Most of the existing > > NV12 codepaths work regardless of subsampling and are re-used as is. > > Where necessary I wrote the slightly different NV24 versions. > > > > Finally, the one thing that confused me for a long time was the > > asm specific x86 path that did an explicit exclusion check for NV12. > > I replaced that with a semi-planar check and also updated the > > equivalent PPC code, but which I cannot test. > > > > Signed-off-by: Philip Langdale > > --- > > libswscale/input.c | 2 + > > libswscale/output.c | 6 ++- > > libswscale/ppc/swscale_altivec.c | 3 +- > > libswscale/ppc/swscale_vsx.c | 3 +- > > libswscale/swscale_unscaled.c | 51 ++++++++++++++++++++++++ > > libswscale/utils.c | 2 + > > libswscale/version.h | 2 +- > > libswscale/x86/swscale_template.c | 4 +- > > tests/ref/fate/filter-pixfmts-copy | 2 + > > tests/ref/fate/filter-pixfmts-crop | 2 + > > tests/ref/fate/filter-pixfmts-field | 2 + > > tests/ref/fate/filter-pixfmts-fieldorder | 2 + > > tests/ref/fate/filter-pixfmts-hflip | 2 + > > tests/ref/fate/filter-pixfmts-il | 2 + > > tests/ref/fate/filter-pixfmts-null | 2 + > > tests/ref/fate/filter-pixfmts-pad | 2 + > > tests/ref/fate/filter-pixfmts-scale | 2 + > > tests/ref/fate/filter-pixfmts-transpose | 2 + > > tests/ref/fate/filter-pixfmts-vflip | 2 + > > 19 files changed, 86 insertions(+), 9 deletions(-) > > was this tested with up/down scaling ? also seems to require this: [...] diff --git a/tests/ref/fate/sws-pixdesc-query b/tests/ref/fate/sws-pixdesc-query index 6c41a86e1e..bc8147e3c7 100644 --- a/tests/ref/fate/sws-pixdesc-query +++ b/tests/ref/fate/sws-pixdesc-query @@ -178,6 +178,8 @@ isYUV: nv20be nv20le nv21 + nv24 + nv42 p010be p010le p016be @@ -268,6 +270,8 @@ isPlanarYUV: nv20be nv20le nv21 + nv24 + nv42 p010be p010le p016be @@ -703,6 +707,8 @@ Planar: nv20be nv20le nv21 + nv24 + nv42 p010be p010le p016be