[FFmpeg-devel] [PATCH] lavc/cuvid: fail early if GPU can't handle given video resolution

Pavel Koshevoy pkoshevoy at gmail.com
Mon Jan 2 22:51:31 EET 2017


On Mon, Jan 2, 2017 at 9:37 AM, Philip Langdale <philipl at overt.org> wrote:
> On Mon, 2 Jan 2017 00:56:18 -0700
> Pavel Koshevoy <pkoshevoy at gmail.com> wrote:

>> Perhaps a more comprehensive solution is needed.  I've run into the
>> same problem again (avcodec_open2 succeeds, decoding spits errors)
>> when I tried to play back an mpeg2 stream with YUV422P pixel format.
>>
>> I have a new patch but I'd like to test it on a Pascal GPU first.  I
>> am still hoping that 422 decoding will work.  It looks like it should
>> be supported, but I've observed on Geforce GT 730 that even though I
>> can instantiate a cuvid decoder with cudaVideoChromaFormat_422 without
>> error -- the decoded video is garbage everywhere except for 16-pixel
>> wide column along the left edge of the frame.
>>
>> In ee88dcb2 cuvid_handle_video_sequence was hard-coded to error-out if
>> the chroma format is not 420.  This looks like an NVIDIA driver/cuvid
>> bug... does anyone know how to bring it to their attention?
>
> It is documented as only supporting 420, even though it doesn't return
> an error, so it's not a bug per-se - it's just that they don't detect
> and return an error, so we do it ourselves.
>
> --phil


I don't recall seeing it mentioned that they do not support 422 and
444 in nvidia docs, but I haven't looked very hard yet.  I find it odd
that they have enum values to represent these chroma formats, yet they
don't work...  I'll see if I can file a bug with nvidia about this,
tomorrow.  I'll send another patch in about an hour to address the
original problem that got me looking in cuvid.c.

    Pavel.


More information about the ffmpeg-devel mailing list