[FFmpeg-devel] [PATCH] lavfi: Port fspp to FFmpeg
arwa arif
arwaarif1994 at gmail.com
Tue Dec 23 05:26:16 CET 2014
On Mon, Dec 22, 2014 at 10:27 PM, Michael Niedermayer <michaelni at gmx.at>
wrote:
> 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
>
When using 71. , there is a segfault. I tried using float bias instead of
int bias also, but it still gives segfault.
How do I resolve it?
>
> 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
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
Updated the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-port-mp-fspp-to-a-native-libavfilter-filter.patch
Type: text/x-patch
Size: 93083 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141223/a4c4f53c/attachment.bin>
More information about the ffmpeg-devel
mailing list