[FFmpeg-devel] [PATCH] avfilter: port qp filter from libmpcodecs
Paul B Mahol
onemda at gmail.com
Thu Sep 19 00:25:56 CEST 2013
On 9/18/13, Clement Boesch <u at pkh.me> wrote:
> On Wed, Sep 18, 2013 at 06:34:36PM +0000, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>> doc/filters.texi | 32 ++++++++++
>> libavfilter/Makefile | 1 +
>> libavfilter/allfilters.c | 1 +
>> libavfilter/vf_qp.c | 154
>> +++++++++++++++++++++++++++++++++++++++++++++++
>> 4 files changed, 188 insertions(+)
>> create mode 100644 libavfilter/vf_qp.c
>>
> [...]
>> +static int filter_frame(AVFilterLink *inlink, AVFrame *in)
>> +{
>> + AVFilterContext *ctx = inlink->dst;
>> + AVFilterLink *outlink = ctx->outputs[0];
>> + QPContext *s = ctx->priv;
>> + AVFrame *out;
>> +
>> + if (!s->qp_expr_str || ctx->is_disabled)
>> + return ff_filter_frame(outlink, in);
>> +
>> + out = av_frame_clone(in);
>> + if (!out) {
>> + av_frame_free(&in);
>> + return AVERROR(ENOMEM);
>> + }
>> +
>
>> + out->qscale_table = s->qp;
>
> So the table is valid for an undefined amount of time? With the ref
> counting API, I believe this is not the desired behaviour.
Right, silly me. I will copy it.
Is there something else?
>
> [...]
>
> --
> Clement B.
>
More information about the ffmpeg-devel
mailing list