[vlc-devel] VLC with VDPAU is falling back to s/w decoding for vc1 simple profile clips.

Manoj Bonda mbonda at nvidia.com
Wed Feb 20 12:07:42 CET 2019


VLC with VDPAU is falling back to s/w decoding for vc1 simple and Main profile clips.
i.e. with cmd ./vlc --avcodec-hw=vdpau /home/bondamanoj/VideoClips/Amazing_Caves_720.wmv
and error is reported as, "Failed setup for format vdpau: hwaccel initialisation returned error"

This failure is due to level check in function ff_vdpau_common_init() in ffmpeg/libavcodec/vdpau.c
The level is not populated in ffmpeg for vc1 simple and main profile clips.
As the level will be communicated via transport layer, as per section D.4 Syntax (Informative) from vc1 spec
"The Simple and Main profiles are communicated to the decoder by the syntax element PROFILE as part of the
initialization metadata as described in Annex J.1.1. The Advanced profile is signaled to the decoder in the bitstream,
by the syntax element PROFILE, which is included in the sequence header as described in Section 6.1.1.

The levels for Simple and Main profile are to be communicated to the decoder by the Transport Layer. The levels for
Advanced profile are indicated in the syntax element LEVEL, which is included in the sequence header, as described in Section 6.1.2.
The following codes are used to signal the levels in this profile:"

I see, ffmpeg sets 'AV_HWACCEL_FLAG_IGNORE_LEVEL' flag. Hence, the level is initialized to zero
while using ffmpeg. This lets standalone ffmpeg application and Mplayer to decode the clip with VDPAU hw acceleration.

I observed that VLC is not setting AV_HWACCEL_FLAG_IGNORE_LEVEL flag, level gets initialized to -99,
and eventually fails the check in ff_vdpau_common_init() resulting in the failure reported above.

Attaching the patch for setting AV_HWACCEL_FLAG_IGNORE_LEVEL flag in VLC as well.
I am curious what others think about this issue.


This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190220/6368b07e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-flag-HWACCEL_FLAG_IGNORE_LEVEL-to-hwaccel-flags.patch
Type: application/octet-stream
Size: 1414 bytes
Desc: 0001-Add-flag-HWACCEL_FLAG_IGNORE_LEVEL-to-hwaccel-flags.patch
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190220/6368b07e/attachment.obj>

More information about the vlc-devel mailing list