diff mbox

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

Message ID 3257FB79429C93418DB5AB36198F40D6253AEF6E@SHSMSX104.ccr.corp.intel.com
State New
Headers show

Commit Message

Zachary Zhou April 11, 2019, 8:37 a.m. UTC
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of

> Li, Zhong

> Sent: Wednesday, April 10, 2019 10:14 AM

> To: FFmpeg development discussions and patches <ffmpeg-devel@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.



-Zach


> 

> _______________________________________________

> 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".
diff mbox

Patch

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 "