[FFmpeg-devel] [PATCH RFC v2 2/3] libavcodec: Add thumbnail output to vaapi_h264 decoder

Zhou, Zachary zachary.zhou at intel.com
Thu Apr 11 11:37:16 EEST 2019



> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
> Li, Zhong
> Sent: Wednesday, April 10, 2019 10:14 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH RFC v2 2/3] libavcodec: Add thumbnail
> output to vaapi_h264 decoder
> 
> > As my investigation -
> > - This feature can save some power and memory bandwidth.
> > - This feature can save the ffmpeg filters code writing for end user.
> > it also support ARGB output for some AI use case, I think some AI
> > cases may need ARGB input.
> 
> IIUC, vaapi SFC scaling in libavfilter path should can support ARGB output too,
> am I wrong?

Thanks Zhong,  ffmpeg should can do it. but iHD driver has an issue -
https://github.com/intel/media-driver/issues/500

and I think ffmpeg may do following changes or iHD support ARGB in vaPutimage and vaGetImage.

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index e60a8f4d34..caa6d02b15 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -855,7 +855,7 @@ static int vaapi_map_frame(AVHWFramesContext *hwfc,
     // assume for now that the user is not aware of that and would therefore
     // prefer not to be given direct-mapped memory if they request read access.
     if (ctx->derive_works && dst->format == hwfc->sw_format &&
-        ((flags & AV_HWFRAME_MAP_DIRECT) || !(flags & AV_HWFRAME_MAP_READ))) {
+        ((flags & AV_HWFRAME_MAP_DIRECT) || (flags & AV_HWFRAME_MAP_READ))) {
         vas = vaDeriveImage(hwctx->display, surface_id, &map->image);
         if (vas != VA_STATUS_SUCCESS) {
             av_log(hwfc, AV_LOG_ERROR, "Failed to derive image from "


-Zach


> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-request at ffmpeg.org
> with subject "unsubscribe".


More information about the ffmpeg-devel mailing list