From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org> To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org> Cc: "philipl@overt.org" <philipl@overt.org> Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavc/vaapi_decode: add missing flag when picking best pixel format Date: Tue, 9 Aug 2022 05:39:50 +0000 Message-ID: <e35ebbf062a68f7231929a3adf7bda3bca5fe979.camel@intel.com> (raw) In-Reply-To: <20220806032754.71419-2-philipl@overt.org> On Fri, 2022-08-05 at 20:27 -0700, Philip Langdale wrote: > vaapi_decode_find_best_format currently does not set the > VA_SURFACE_ATTRIB_SETTABLE flag on the pixel format attribute that it > returns. > > Without this flag, the attribute will be ignored by vaCreateSurfaces, > meaning that the driver's default logic for picking a pixel format will > kick in. > > So far, this hasn't produced visible problems, but when trying to > decode 4:4:4 content, at least on Intel, the driver will pick the > 444P planar format, even though the decoder can only return the AYUV > packed format. > > The hwcontext_vaapi code that sets surface attributes when picking > formats does not have this bug. > > Applications may use their own logic for finding the best format, and > so may not hit this bug. eg: mpv is unaffected. > > Signed-off-by: Philip Langdale <philipl@overt.org> > --- > libavcodec/vaapi_decode.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c > index db48efc3ed..bc2d3ed803 100644 > --- a/libavcodec/vaapi_decode.c > +++ b/libavcodec/vaapi_decode.c > @@ -358,6 +358,8 @@ static int vaapi_decode_find_best_format(AVCodecContext > *avctx, > > ctx->pixel_format_attribute = (VASurfaceAttrib) { > .type = VASurfaceAttribPixelFormat, > + .flags = VA_SURFACE_ATTRIB_SETTABLE, > + .value.type = VAGenericValueTypeInteger, > .value.value.i = best_fourcc, > }; LGTM, thx -Haihao > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-08-09 5:40 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-06 3:27 [FFmpeg-devel] [PATCH v2 0/2] lavc/vaapi: More 4:4:4 changes Philip Langdale 2022-08-06 3:27 ` [FFmpeg-devel] [PATCH 1/2] lavc/vaapi_decode: add missing flag when picking best pixel format Philip Langdale 2022-08-09 5:39 ` Xiang, Haihao [this message] 2022-08-06 3:27 ` [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_encode: enable 8bit 4:4:4 encoding for HEVC and VP9 Philip Langdale 2022-08-09 5:40 ` Xiang, Haihao -- strict thread matches above, loose matches on Subject: below -- 2022-08-05 3:59 [FFmpeg-devel] [PATCH 0/2] lavc/vaapi: More 4:4:4 changes Philip Langdale 2022-08-05 3:59 ` [FFmpeg-devel] [PATCH 1/2] lavc/vaapi_decode: add missing flag when picking best pixel format Philip Langdale 2022-08-05 5:16 ` Wang, Fei W 2022-08-06 3:24 ` Philip Langdale
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e35ebbf062a68f7231929a3adf7bda3bca5fe979.camel@intel.com \ --to=haihao.xiang-at-intel.com@ffmpeg.org \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=philipl@overt.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git