2017-11-24 14:06 GMT+01:00 Mark Thompson <s...@jkqxz.net>: > On 24/11/17 08:28, Jun Zhao wrote: >> On 2017/11/24 8:51, Mark Thompson wrote: >>> In particular, avoid selecting YV12/YV16 when I420/422H are available. >>> --- >>> libavutil/hwcontext_vaapi.c | 6 +++--- >>> 1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c >>> index fcff25dc9b..2f47162a0d 100644 >>> --- a/libavutil/hwcontext_vaapi.c >>> +++ b/libavutil/hwcontext_vaapi.c >>> @@ -99,15 +99,15 @@ static const struct { >>> enum AVPixelFormat pix_fmt; >>> } vaapi_format_map[] = { >>> MAP(NV12, YUV420, NV12), >>> - MAP(YV12, YUV420, YUV420P), // With U/V planes swapped. >>> - MAP(IYUV, YUV420, YUV420P), >>> #ifdef VA_FOURCC_I420 >>> MAP(I420, YUV420, YUV420P), >>> #endif >>> + MAP(YV12, YUV420, YUV420P), // With U/V planes swapped. >>> + MAP(IYUV, YUV420, YUV420P), >>> + MAP(422H, YUV422, YUV422P), >> Can we give a flag or other field to identify the map priority, not use >> the hard code array index order ? > > Well, really we need to add some way to control the layout for formats > which are identical from the point of view of the CPU (that is, have the > same enum AVPixelFormat).
Is it not enough to set the codec_tag? Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel