[FFmpeg-devel] [PATCH] avfilter/vf_transpose adding NPP transpose filter
Timo Rothenpieler
timo at rothenpieler.org
Tue Sep 4 17:58:37 EEST 2018
On 9/4/2018 3:54 PM, Moritz Barsnick wrote:
> On Tue, Sep 04, 2018 at 07:43:10 +0000, Roman Arzumanyan wrote:
>> Hi Timo,
>>
>> Refactored the patch according to your review:
>
>> + { "interp_algo", "Interpolation algorithm used for transposing", OFFSET(interp_algo), AV_OPT_TYPE_INT, { .i64 = NPPI_INTER_CUBIC }, 0, INT_MAX, FLAGS, "interp_algo" },
>> + { "nn", "nearest neighbour", 0, AV_OPT_TYPE_CONST, { .i64 = NPPI_INTER_NN }, 0, 0, FLAGS, "interp_algo" },
>> + { "linear", "linear", 0, AV_OPT_TYPE_CONST, { .i64 = NPPI_INTER_LINEAR}, 0, 0, FLAGS, "interp_algo" },
>> + { "cubic", "cubic", 0, AV_OPT_TYPE_CONST, { .i64 = NPPI_INTER_CUBIC }, 0, 0, FLAGS, "interp_algo" },
>
> Shouldn't there be a range check somewhere? You allow INT_MAX (could be
> NPPI_INTER_NN .. NPPI_INTER_CUBIC, assuming they are contiguous), and
> pass the value directly to nppiRotate_8u_C1R(). I can't tell whether
> that function does a proper check and error indication though, which
> could suffice.
Interpolation also seems a bit weird in general for perfect 90°
rotations, they should always be pixel perfect no matter the algorithm.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4538 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180904/a11135f8/attachment.bin>
More information about the ffmpeg-devel
mailing list