[FFmpeg-devel] [PATCH] avfilter: port qp filter from libmpcodecs
Paul B Mahol
onemda at gmail.com
Thu Sep 19 00:40:50 CEST 2013
On 9/18/13, Paul B Mahol <onemda at gmail.com> wrote:
> 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?
Or can I copy this?
Nothing in codebase allocate this or free it so I'm not sure whatever
I do is correct.
As current mp=qp filter does nothing I will simply remove it.
This may force someone(if any) who actually care about it to finnaly fix it.
(He can reuse this template freely.)
More information about the ffmpeg-devel
mailing list