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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT 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 9ACA5C3A5A2 for ; Tue, 3 Sep 2019 18:17:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C56A22D6D for ; Tue, 3 Sep 2019 18:17:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729653AbfICSRZ (ORCPT ); Tue, 3 Sep 2019 14:17:25 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38032 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfICSRZ (ORCPT ); Tue, 3 Sep 2019 14:17:25 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 5A40F28A0A2 From: Ezequiel Garcia To: linux-media@vger.kernel.org Cc: kernel@collabora.com, Tomasz Figa , linux-rockchip@lists.infradead.org, Heiko Stuebner , Jonas Karlman , Philipp Zabel , Boris Brezillon , Chris Healy , Ezequiel Garcia Subject: [PATCH 0/4] Enable Hantro G1 post-processor Date: Tue, 3 Sep 2019 15:17:07 -0300 Message-Id: <20190903181711.7559-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi all, This series enables the post-processor support available on the Hantro G1 VPU. The post-processor block can be pipelined with the decoder hardware, allowing to perform operations such as color conversion, scaling, rotation, cropping, among others. The decoder hardware needs its own set of NV12 buffers (the native decoder format), and the post-processor is the owner of the CAPTURE buffers. This allows the application get processed (scaled, converted, etc) buffers, completely transparently. This feature is implemented by exposing other CAPTURE pixel formats to the application (ENUM_FMT). When the application sets a pixel format other than NV12, the driver will enable and use the post-processor transparently. Patches 1 to 3 cleanup and organize the code to allow easier integration of the post-processor. Then patch 4 introduces the new pixel formats and enables the post-processor itself. I am aware it's still early for v5.5, yet I'm posting this series to get feedback and allow others to tests. Also, keep in mind these patches are conflict with Jonas' recent series. This is tested on RK3288 platforms with MPEG-2, VP8 and H264 streams, decoding to RGB and YUV-packed surfaces. Thanks, Ezequiel Ezequiel Garcia (4): media: hantro: Simplify macroblock macros media: hantro: Simplify buffer helpers media: hantro: Add helper for the H264 motion vectors allocation media: hantro: Support color conversion via post-processing drivers/staging/media/hantro/Makefile | 1 + drivers/staging/media/hantro/hantro.h | 49 ++- drivers/staging/media/hantro/hantro_drv.c | 27 +- .../staging/media/hantro/hantro_g1_h264_dec.c | 9 +- .../media/hantro/hantro_g1_mpeg2_dec.c | 14 +- .../staging/media/hantro/hantro_g1_vp8_dec.c | 13 +- .../staging/media/hantro/hantro_h1_jpeg_enc.c | 4 +- drivers/staging/media/hantro/hantro_h264.c | 26 +- drivers/staging/media/hantro/hantro_hw.h | 15 +- .../staging/media/hantro/hantro_postproc.c | 316 ++++++++++++++++++ drivers/staging/media/hantro/hantro_v4l2.c | 25 +- drivers/staging/media/hantro/rk3288_vpu_hw.c | 37 +- drivers/staging/media/hantro/rk3399_vpu_hw.c | 12 +- .../media/hantro/rk3399_vpu_hw_jpeg_enc.c | 4 +- .../media/hantro/rk3399_vpu_hw_mpeg2_dec.c | 11 +- .../media/hantro/rk3399_vpu_hw_vp8_dec.c | 12 +- 16 files changed, 483 insertions(+), 92 deletions(-) create mode 100644 drivers/staging/media/hantro/hantro_postproc.c -- 2.22.0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ezequiel Garcia Subject: [PATCH 0/4] Enable Hantro G1 post-processor Date: Tue, 3 Sep 2019 15:17:07 -0300 Message-ID: <20190903181711.7559-1-ezequiel@collabora.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Heiko Stuebner , Jonas Karlman , Tomasz Figa , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Boris Brezillon , Philipp Zabel , kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org, Ezequiel Garcia , Chris Healy List-Id: linux-rockchip.vger.kernel.org Hi all, This series enables the post-processor support available on the Hantro G1 VPU. The post-processor block can be pipelined with the decoder hardware, allowing to perform operations such as color conversion, scaling, rotation, cropping, among others. The decoder hardware needs its own set of NV12 buffers (the native decoder format), and the post-processor is the owner of the CAPTURE buffers. This allows the application get processed (scaled, converted, etc) buffers, completely transparently. This feature is implemented by exposing other CAPTURE pixel formats to the application (ENUM_FMT). When the application sets a pixel format other than NV12, the driver will enable and use the post-processor transparently. Patches 1 to 3 cleanup and organize the code to allow easier integration of the post-processor. Then patch 4 introduces the new pixel formats and enables the post-processor itself. I am aware it's still early for v5.5, yet I'm posting this series to get feedback and allow others to tests. Also, keep in mind these patches are conflict with Jonas' recent series. This is tested on RK3288 platforms with MPEG-2, VP8 and H264 streams, decoding to RGB and YUV-packed surfaces. Thanks, Ezequiel Ezequiel Garcia (4): media: hantro: Simplify macroblock macros media: hantro: Simplify buffer helpers media: hantro: Add helper for the H264 motion vectors allocation media: hantro: Support color conversion via post-processing drivers/staging/media/hantro/Makefile | 1 + drivers/staging/media/hantro/hantro.h | 49 ++- drivers/staging/media/hantro/hantro_drv.c | 27 +- .../staging/media/hantro/hantro_g1_h264_dec.c | 9 +- .../media/hantro/hantro_g1_mpeg2_dec.c | 14 +- .../staging/media/hantro/hantro_g1_vp8_dec.c | 13 +- .../staging/media/hantro/hantro_h1_jpeg_enc.c | 4 +- drivers/staging/media/hantro/hantro_h264.c | 26 +- drivers/staging/media/hantro/hantro_hw.h | 15 +- .../staging/media/hantro/hantro_postproc.c | 316 ++++++++++++++++++ drivers/staging/media/hantro/hantro_v4l2.c | 25 +- drivers/staging/media/hantro/rk3288_vpu_hw.c | 37 +- drivers/staging/media/hantro/rk3399_vpu_hw.c | 12 +- .../media/hantro/rk3399_vpu_hw_jpeg_enc.c | 4 +- .../media/hantro/rk3399_vpu_hw_mpeg2_dec.c | 11 +- .../media/hantro/rk3399_vpu_hw_vp8_dec.c | 12 +- 16 files changed, 483 insertions(+), 92 deletions(-) create mode 100644 drivers/staging/media/hantro/hantro_postproc.c -- 2.22.0