[FFmpeg-devel] [V3 2/4] lavc: enable hwaccel_flags option

Mark Thompson sw at jkqxz.net
Mon Oct 9 14:46:16 EEST 2017


On 09/10/17 08:49, Jun Zhao wrote:
> 
> From ba5f522929f5232132121f339c288fb6464fdd39 Mon Sep 17 00:00:00 2001
> From: Jun Zhao <jun.zhao at intel.com>
> Date: Mon, 9 Oct 2017 02:22:38 -0400
> Subject: [V3 2/4] lavc: enable hwaccel_flags option
> 
> enable pre-stream hwaccel_flags.

"per-stream"

> 
> Signed-off-by: Jun Zhao <jun.zhao at intel.com>
> ---
>  libavcodec/options_table.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
> index 12712fb541..2ac37c3ff1 100644
> --- a/libavcodec/options_table.h
> +++ b/libavcodec/options_table.h
> @@ -576,6 +576,10 @@ static const AVOption avcodec_options[] = {
>  {"pixel_format", "set pixel format", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64=AV_PIX_FMT_NONE}, -1, INT_MAX, 0 },
>  {"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 },
>  {"max_pixels", "Maximum number of pixels", OFFSET(max_pixels), AV_OPT_TYPE_INT64, {.i64 = INT_MAX }, 0, INT_MAX, A|V|S|D|E },
> +{"hwaccel_flags", NULL, OFFSET(hwaccel_flags), AV_OPT_TYPE_FLAGS, {.i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, 0, UINT_MAX, V|D, "hwaccel_flags"},
> +{"ignore_level", "ignore level even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver", 0, AV_OPT_TYPE_CONST, { .i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, INT_MIN, INT_MAX, V | D, "hwaccel_flags" },
> +{"allow_high_depth", "allow to output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component", 0, AV_OPT_TYPE_CONST, {.i64 = AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH }, INT_MIN, INT_MAX, V | D, "hwaccel_flags"},
> +{"allow_profile_mismatch", "attempt to decode anyway if HW accelerated decoder's supported profiles do not exactly match the stream", 0, AV_OPT_TYPE_CONST, {.i64 = AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH }, INT_MIN, INT_MAX, V | D, "hwaccel_flags"},
>  {NULL},
>  };
>  
> -- 
> 2.11.0
> 

LGTM, will push later if noone else has any comments.

- Mark


More information about the ffmpeg-devel mailing list