On 5/13/2015 9:59 AM, Luca Barbato wrote: > +#if (X265_BUILD >= 57) > +#define init_libx265(B) \ > + do { \ > + ctx->api = x265_api_get((B)); \ > + if (!ctx->api) \ > + ctx->api = x265_api_get(0); \ > + } while (0) > + > +#undef x265_encoder_open > + > +#define x265_param_free(PA) \ > + ctx->api->param_free((PA)) > +#define x265_encoder_close(C) \ > + ctx->api->encoder_close((C)) > +#define x265_param_alloc() \ > + ctx->api->param_alloc() > +#define x265_param_default_preset(PA, PR, TU) \ > + ctx->api->param_default_preset((PA), (PR), (TU)) > +#define x265_param_parse(PA, K, V) \ > + ctx->api->param_parse((PA), (K), (V)) > +#define x265_encoder_open(PA) \ > + ctx->api->encoder_open((PA)) > +#define x265_encoder_headers(EN, NAL, NNAL) \ > + ctx->api->encoder_headers((EN), (NAL), (NNAL)) > +#define x265_picture_init(PA, PIC) \ > + ctx->api->picture_init((PA), (PIC)) > +#define x265_encoder_encode(EN, NAL, NNAL, PIC, POUT) \ > + ctx->api->encoder_encode((EN), (NAL), (NNAL), (PIC), (POUT)) > +#else > +#define init_libx265(B) \ > + do {} while (0) > + > +#endif /* X265_BUILD */ > > +#if (X265_BUILD >= 57) > + const x265_api *api; > +#endif > > and init_libx265 at init.
Useful to some maybe, but I don't think it belongs in the codebase (e.g. we never did such things for libx264). - Derek _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel