On 13/05/15 09:56, Hendrik Leppkes wrote:
> On Wed, May 13, 2015 at 9:52 AM, Luca Barbato <[email protected]> wrote:
>> On 13/05/15 03:51, James Almer wrote:
>>
>>>> The x265pic.bitDepth is set on encode_frame while I assume that this
>>>> information should be used at init now.
>>>>
>>>> I'm not sure how recent is this api version, I hope it isn't necessary
>>>
>>> The API as used and required by this patch is not available on any tagged
>>> release
>>> right now. It will be in x265 1.7.
>>>
>>
>> Then a fallback support is needed...
>
> How is that?
>
> 1.7 will be released shortly, I don't see the big reason to clutter
> the code up with needless cruft.
Ah, that answers to my initial question then =)
The macros to make the support transparent, in case somebody need it:
+#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.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel