[FFmpeg-devel] [PATCHv2] add signature filter for MPEG7 video signature
Michael Niedermayer
michael at niedermayer.cc
Sun Apr 24 01:44:51 CEST 2016
On Tue, Apr 19, 2016 at 04:37:16PM +0200, Gerion Entrup wrote:
> On Dienstag, 19. April 2016 13:25:53 CEST Moritz Barsnick wrote:
[...]
> +static const ElemCat* elements[ELEMENT_COUNT] = { &elem_a1, &elem_a2,
> + &elem_d1, &elem_d2, &elem_d3, &elem_d4,
> + &elem_d5, &elem_d6, &elem_d7, &elem_d8 };
> +
> +// TODO the lut could be here, with calculation at compile time, but don't know how possible
> +//static const int l1distlut[255*256/2];
see
AVOnce
[...]
> +static int request_frame(AVFilterLink *outlink)
> +{
> + AVFilterContext *ctx = outlink->src;
> + SignatureContext *sc = ctx->priv;
> + int i, ret;
> +
> + for (i = 0; i < sc->nb_inputs; i++){
> + ret = ff_request_frame(ctx->inputs[i]);
> + // TODO handle this in a better way?
> + // Problem is the following:
> + // Assuming two inputs, inputA with 50 frames, inputB with 100 frames
> + // simply returning ret when < 0 would result in not filtering inputB
> + // after 50 frames anymore, not wanted
> + // only returning ret at the end would result in only respecting the error
> + // values of the last input, please comment
> + if (ret < 0 && ret != AVERROR_EOF)
> + return ret;
> + }
> + return ret;
> +}
i dont know what exactly you want to happen when the inputs mismatch
but handling it like other dualinput filters might be an option
[...]
> +static av_cold void uninit(AVFilterContext *ctx)
> +{
> + SignatureContext *sic = ctx->priv;
> + StreamContext *sc, *sc2;
> + void* tmp;
> + FineSignature* finsig;
> + CourseSignature* cousig;
> + MatchingInfo match;
> + int i,j;
> +
> + //TODO export and especially lookup_signature can have a return value to show some error etc.
> + //How could this be handled in this function?
why does it need to happen in uninit ?
EOF could be detected before uninit if it doesnt work here
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160424/8beb1ae3/attachment.sig>
More information about the ffmpeg-devel
mailing list