[FFmpeg-devel] [PATCH] lavc/cuvid: fail early if GPU can't handle video parameters
Pavel Koshevoy
pkoshevoy at gmail.com
Sun Jan 22 18:37:40 EET 2017
On 01/22/2017 07:05 AM, Timo Rothenpieler wrote:
>> Despite wm4 objections I am resubmitting this patch, because I can
>> find no other reasonable method for rejecting ffmpeg cuvid decoder
>> when it can't handle a given video stream. An unreasonable
>> alternative would be to duplicate the work that cuvid.c does
>> internally on my application side, and that would be of little benefit
>> to me and to ffmpeg -- I might as well use the nvenc APIs directly
>> then. I still see this patch as an improvement.
> Cuvid should still return an error, just not on init, while some stream
> parameters are still unknown, but when decoding the first (couple) frame(s).
> If there is a case where it doesn't, I'd much rather fix that.
It didn't return an error. I was testing with 5K and 8K h264 samples mentioned
at http://kodi.wiki/view/Samples on a GeForce GT 730 which only supports 4K
8-bit h264 -- ctx->cvdl->cuvidParseVideoData never returned an error, and
cuvid_handle_video_sequence callback was never called. The only indication I
ever got from cuvid that it won't work was during ctx->cvdl->cuvidCreateDecoder
call (after my patch).
Pavel.
More information about the ffmpeg-devel
mailing list