[FFmpeg-devel] [PATCH] avfilter/vf_transpose adding NPP transpose filter

Roman Arzumanyan rarzumanyan at nvidia.com
Tue Sep 4 10:43:10 EEST 2018


Hi Timo,

Refactored the patch according to your review:
1. It actually does the rotation, so renamed the filter.
2. Replaced "t" with the "a" & "angle" cli options like in vf_rotate filter. Though supporting rotation angle multiple of 90 degrees.
3. Added the config dependency (not sure if I've done it the right way).

Cmd to check:
ffmpeg.exe ^
-hwaccel cuvid ^
-codec:v h264_cuvid ^
-i input_240.mp4 ^
-vcodec h264_nvenc ^
-vf rotate_npp="a=180" ^
-y rotate_npp_180.mp4

-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Timo Rothenpieler
Sent: Monday, September 3, 2018 1:43 PM
To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>; Roman Arzumanyan <rarzumanyan at nvidia.com>
Cc: Yogender Gupta <ygupta at nvidia.com>
Subject: Re: [FFmpeg-devel] [PATCH] avfilter/vf_transpose adding NPP transpose filter

Minus the missing configure dependency, documentation entry and minor bump, the filter looks fine to me code wise.

Two issues though:

 From my understanding, it's not a transpose filter, but a rotation one, fixed to 90 degree angles. Unless I'm missing something in the code, it's not doing any actual flipping, like vf_transpose does.
It should also be calling nppiTranspose_8u_C1R somewhere after/before the call to nppiRotate_8u_C1R. Or use a transformation matrix to do the transposition in one step, assuming libnpp has a function for that.

It's possible that I missed it doing the transpose somewhere, so please correct me if I'm wrong.

I'd also strongly prefer this filter to be compatible with the arguments of normal vf_transpose, and behave the same for the same arguments. 
Additional parameters with more functions are fine.



Timo


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adding-NPP-rotate-filter.patch
Type: application/octet-stream
Size: 21961 bytes
Desc: 0001-Adding-NPP-rotate-filter.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180904/7bd2d682/attachment.obj>


More information about the ffmpeg-devel mailing list