[FFmpeg-devel] [PATCH] NV12 Tile format conversion

Hendrik Leppkes h.leppkes at gmail.com
Fri Dec 16 12:57:50 EET 2016

On Fri, Dec 16, 2016 at 10:41 AM, Sunny Shukla
<sunny.shukla at einfochips.com> wrote:
> Hi,
> NV12 Tile format conversion to NV12 and yuv420p support is added. NV12 Tile format conversion support is only added for input format not as output format.
> The algorithm used is referenced from https://github.com/ssshukla26/NV12Tile-To-NV12-Conversion. It is checked with 480p,720p, 1080p and other resolutions. Videos both in landscape and portrait mode are been able to be converted from nv12 tiled to nv12 format using this algorithm. The input file must be a yuv file in NV12Tile format, one can download such video with 480p resolution from this https://drive.google.com/open?id=0B5dp19Ic3reULWJIS0JTRFVZbjg link. See instructions file under examples folder for more details in the github link.
> For memory layout please refer https://www.linuxtv.org/downloads/v4l-dvb-apis-old/re36.html
> The need to incorporate this format conversion is to make sure that when certain hardware decoders outputs
> the data in nv12 tiled format can also be directly displayed in nv12 or yuv420p format using ffmpeg command line
> and APIs.
> P.S. : This patch is applied on commit id "d4c1cc2b876af1e8f1a8ca258bf092b3baa31245" of ffmpeg release 3.2 (latest release).
> PFA : 0001-Input-format-NV12-Tile-support-added.patch

The patch has some serious issues, but before we go into those more
generally I don't think we should start representing tiled formats as
pixfmts as they are just drastically different to any normal pixfmt
and violate the most basic assumptions otherwise true for every other
pixfmt (ie. basic linear row/col based layout, and more).
It seems to me that if you want to use ffmpeg to convert from tiled to
non-tiled, a decoder might be more appropriate then hacking such a
conversion into swscale as a pixfmt.

- Hendrik

More information about the ffmpeg-devel mailing list