[FFmpeg-devel] [PATCH V2 1/2] ffmpeg: re-enable hwaccel_lax_profile_check use hwaccel_flags.
Jun Zhao
mypopydev at gmail.com
Mon Oct 9 05:40:41 EEST 2017
On 2017/10/1 23:20, Mark Thompson wrote:
> On 29/09/17 02:58, Jun Zhao wrote:
>> From e2a7cce88d2a47c7e598b59d24258fea8d809c22 Mon Sep 17 00:00:00 2001
>> From: Jun Zhao <jun.zhao at intel.com>
>> Date: Thu, 21 Sep 2017 02:41:29 -0400
>> Subject: [PATCH V2 1/2] ffmpeg: re-enable hwaccel_lax_profile_check use
>> hwaccel_flags.
>>
>> re-enable hwaccel_lax_profile_check option use hwaccel_flags.
>>
>> Signed-off-by: Jun Zhao <jun.zhao at intel.com>
>> ---
>> ffmpeg.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/ffmpeg.c b/ffmpeg.c
>> index 1d248bc269..4f2b9d69d9 100644
>> --- a/ffmpeg.c
>> +++ b/ffmpeg.c
>> @@ -2859,6 +2859,9 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat
>>
>> ist->active_hwaccel_id = hwaccel->id;
>> ist->hwaccel_pix_fmt = *p;
>> +
>> + if (hwaccel_lax_profile_check)
>> + s->hwaccel_flags |= AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH;
>> break;
>> }
>>
>> --
>> 2.11.0
>>
> I'm inclined to say we should just remove the ad-hoc global lax_profile_check option (which was previously implemented only in ffmpeg.c code for VAAPI) and add a per-stream -hwaccel_flags option to set AVCodecContext.hwaccel_flags directly instead. That can contain "ignore_level" and "allow_profile_mismatch" together, and maybe future flags if appropriate.
>
> What do you think?
>
> - Mark
I agree, will re-submit with the new option/flags.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list