[FFmpeg-devel] [PATCH] avfilter: add nvidia NPP based transpose filter

Paul B Mahol onemda at gmail.com
Sat Sep 8 18:38:22 EEST 2018


On 9/8/18, Timo Rothenpieler <timo at rothenpieler.org> wrote:
> On 9/8/2018 3:49 PM, Timo Rothenpieler wrote:
>> From: Roman Arzumanyan <rarzumanyan at nvidia.com>
>>
>> Signed-off-by: Timo Rothenpieler <timo at rothenpieler.org>
>> ---
>> I'm not overly a fan of a rotate filter that only support 90DEG angles
>> either.
>> So here's my modified version of the original transpose filter, which
>> now behaves the exact same as the software transpose filter.
>>
>> Additionally, I removed the format conversion from the filter. That's
>> the job of the scale filter, and also saves you from doing pointless
>> double format conversion if you scale and transpose NV12 video.
>> Nvenc accepts yuv420p/444p input anyway, and if you really need to, one
>> can add another scale_npp after to get back nv12.
>>
>> A possible commandline for this is:
>> ./ffmpeg.exe -hwaccel cuvid -c:v h264_cuvid -i in.mkv -c copy -c:v
>> h264_nvenc -vf scale_npp=format=yuv420p,transpose_npp=cclock_flip out.mkv
>
> I'll probably remove the interp_algo from this before committing, hard
> coding it to nearest neighbor. I'm unable to see any difference between
> them for perfect 90DEG angles except that NN is easily 10 times faster
> than the current default Cubic.

Perhaps interpolation is useful for other pixel format where vertical
and horizontal subsampling are not same.


More information about the ffmpeg-devel mailing list