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. Cheers, Moritz _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel