[FFmpeg-devel] [PATCH] lavfi: Port fspp to FFmpeg
Michael Niedermayer
michaelni at gmx.at
Mon Dec 22 17:57:07 CET 2014
On Mon, Dec 22, 2014 at 09:51:25PM +0530, arwa arif wrote:
[...]
> +static int filter_frame(AVFilterLink *inlink, AVFrame *in)
> +{
> + AVFilterContext *ctx = inlink->dst;
> + FSPPContext *fspp = ctx->priv;
> + AVFilterLink *outlink = ctx->outputs[0];
> + AVFrame *out = in;
> +
> + int qp_stride = 0;
> + uint8_t *qp_table = NULL;
> + int i, bias;
> + int custom_threshold_m[64];
> +
> + bias = (1 << 4) + fspp->strength;
> +
> + for (i = 0; i < 64; i++) //FIXME: tune custom_threshold[] and remove this !
> + custom_threshold_m[i] = (uint64_t)(custom_threshold[i] * (bias / 71) + 0.5);
it needs to be 71.
which is a lazy way to write 71.0 that is a floating point value
while 71 is integer and the result of the division differs
also there are some tabs in there that should be spaces
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141222/082a8b63/attachment.asc>
More information about the ffmpeg-devel
mailing list