On 28/03/17 10:06, wm4 wrote:
> On Mon, 27 Mar 2017 21:38:10 +0100
> Mark Thompson <s...@jkqxz.net> wrote:
> 
>> ---
>> For naughty people only - this won't be set by default anywhere.
>>
>>
>>  doc/APIchanges       |  3 +++
>>  libavcodec/avcodec.h | 14 ++++++++++++++
>>  2 files changed, 17 insertions(+)
>>
>> diff --git a/doc/APIchanges b/doc/APIchanges
>> index a0ca3b7ac..5da821c90 100644
>> --- a/doc/APIchanges
>> +++ b/doc/APIchanges
>> @@ -13,6 +13,9 @@ libavutil:     2017-03-23
>>  
>>  API changes, most recent first:
>>  
>> +2017-04-xx - xxxxxxx - lavc 58.x.y+1 - avcodec.h
>> +  Add AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH.
>> +
>>  2017-03-xx - xxxxxxx - lavc 57.37.0 - avcodec.h
>>    Add AVCodecContext.hwaccel_flags field. This will control some hwaccels at
>>    a later point.
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index 1c58fe2d6..2aa70ca4f 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -3004,6 +3004,20 @@ typedef struct AVHWAccel {
>>  #define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
>>  
>>  /**
>> + * Hardware acceleration should still be attempted for decoding when the
>> + * codec profile does not match the reported capabilities of the hardware.
>> + *
>> + * For example, this can be used to try to decode baseline profile H.264
>> + * streams in hardware - it will often succeed, because many streams marked
>> + * as baseline profile actually conform to constrained baseline profile.
>> + *
>> + * @warning If the stream is actually not supported then the behaviour is
>> + *          undefined, and may include returning entirely incorrect output
>> + *          while indicating success.
>> + */
>> +#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
>> +
>> +/**
>>   * @}
>>   */
>>  
> 
> What are the exact semantics of this? I assume it's something like
> picking the highest profile if the exact profile is not available.

Yes.  But, I was really going for "deliberately unclear" - it's doing something 
dubious and may be undefined behaviour, but also could happen to do the thing 
you want in some cases.

(I wouldn't mind the semantics being even more nebulous - 
"AV_HWACCEL_FLAG_TRY_INCOMPATIBLE_STREAMS_ANYWAY".)

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to