Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751066AbaLOSXu (ORCPT ); Mon, 15 Dec 2014 13:23:50 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:39565 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750921AbaLOSXo (ORCPT ); Mon, 15 Dec 2014 13:23:44 -0500 Message-ID: <548F272E.3040808@gmail.com> Date: Mon, 15 Dec 2014 10:23:42 -0800 From: Steve Longerbeam User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Jean-Michel Hautbois , Philipp Zabel , linux-kernel CC: =?UTF-8?B?RnLDqWTDqXJpYyBTdXJlYXU=?= , Fabio Estevam , Nicolas Dufresne Subject: Re: i.MX6 CSC and scaler References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------090309000805000907060908" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------090309000805000907060908 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 12/15/2014 09:03 AM, Jean-Michel Hautbois wrote: > Hi Steve, Philipp, > > I see in the kernel sources you created a ipu-ic.c file which helps > working with the Color Space Converter on i.MX6. > We would like to use it on our board with GStreamer, as the conversion > done by the CPU is not very efficient :). > What is the easiest/best approach to this ? > Should we create a video device using a new driver, which would be > instanciated as a /dev/videoX and see as a transform element in > GStreamer ? > The idea is to have a separate element, ideally without memory copy or > anything like that. Hi JM, I've written a mem2mem driver for this. It does tiling to support > 1024x1024 scaled output frames. I've attached it, feel free to use it, it was pulled from a 3.14 kernel. I haven't submitted this driver to community yet, mostly because I want to improve it, most importantly move the tiling support into ipu-ic, so that tiling could eventually be used by any media-device enabled pipeline elements (instead of only mem2mem). Also Philipp probably also has a mem2mem device as well. You would need to write a gstreamer plugin to make use of the mem2mem device for h/w CSC and scaling. Steve --------------090309000805000907060908 Content-Type: text/x-csrc; name="mx6-m2m.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mx6-m2m.c" /* * This is a mem2mem driver for the Freescale i.MX6 SOC. It carries out * color-space conversion, downsizing, resizing, and rotation transformations * on input buffers using the IPU Image Converter's Post-Processing task. * * Based on mem2mem_testdev.c by Pawel Osciak. * * Copyright (c) 2012-2013 Mentor Graphics Inc. * Steve Longerbeam * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the * License, or (at your option) any later version */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include