From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E267C3A5A2 for ; Tue, 3 Sep 2019 12:53:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A82A22DBF for ; Tue, 3 Sep 2019 12:53:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729254AbfICMxJ (ORCPT ); Tue, 3 Sep 2019 08:53:09 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:51257 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728538AbfICMxI (ORCPT ); Tue, 3 Sep 2019 08:53:08 -0400 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1i58J0-0001Lr-Ol; Tue, 03 Sep 2019 14:53:06 +0200 Message-ID: <1567515184.5229.5.camel@pengutronix.de> Subject: Re: [PATCH 02/12] media: hantro: Do not reorder H264 scaling list From: Philipp Zabel To: Jonas Karlman , Ezequiel Garcia Cc: Paul Kocialkowski , "linux-kernel@vger.kernel.org" , Hans Verkuil , "linux-rockchip@lists.infradead.org" , Boris Brezillon , Mauro Carvalho Chehab , "linux-media@vger.kernel.org" Date: Tue, 03 Sep 2019 14:53:04 +0200 In-Reply-To: References: <20190901124531.23645-1-jonas@kwiboo.se> <1567432843.3666.6.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-09-03 at 07:54 +0000, Jonas Karlman wrote: [...] > After a closer look both ffmpeg and rkmpp only apply zig-zag scan and not field scan, > ffmpeg will memcpy the scaling_matrix4/8 as is for vaapi, vdpau and nvdec, > for dxva2 there is a workaround flag that controls if zig-zag should be applied or not. > > I suggest a clarification of the expect order of values and use of the same value order as vaapi, vdpau and nvdec. > i.e. have the scaling list values in "matrix order"/"raster order", after zig-zag scan has been applied, > as is currently expected by cedrus and hantro after this patch. > > I would also suggest a change to the expected order of the 8x8 scaling lists to follow the H264 standard, > instead of the ffmpeg order like this patch and cedrus driver currently expects. > > Expected scaling list order would then be, > for 4x4: Intra Y, Intra Cb, Intra Cr, Inter Y, Inter Cb, Inter Cr, > for 8x8: Intra Y, Inter Y, Intra Cb, Inter Cb, Intra Cr, Inter Cr. I'm in favor of both, it seems unnecessary to reorder the lists in userspace only to have the kernel reorder them back before passing them to the hardware. regards Philipp