[VDPAU] ffmpeg and HEVC: NumLongTermPicturesSlcieHeaderBits

Jose Soltren jsoltren at nvidia.com
Wed May 27 08:48:54 PDT 2015


Hello phil,

On 2015/05/26, 22:58 , "Philip Langdale" <philipl at overt.org> wrote:

>Hi José,
>
>On Tue, 26 May 2015 14:46:41 +0000
>Jose Soltren <jsoltren at nvidia.com> wrote:
>
>> 
>> >This bit count concept isn't used by dxva or by the
>> >software decoder so I
>> >don't have anything to compare with.
>> 
>> Indeed. Ideally this would be part of DXVA, or even better, the
>> H.265/HEVC Specification. (I wonder if Gary Sullivan reads this list.)
>> 
>> >ffmpeg code is here:
>> 
>>>http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/hevc.c;h=df6cc
>>>e6
>> >f8a2cf5dba6bfb1e3bc258462a6b97a3f;hb=HEAD#l231
>> 
>> IIRC a GetBitContext will keep an index value that tells you its
>> current position. This could be useful here.
>> 
>> I would compare decode_lt_rps() to the chart in 7.3.6.1 as mentioned
>> above, see exactly what structures decode_lt_rps() is decoding, and
>> get the bit position out of gb->index before and after these are
>> parsed. Then, take the difference, and pass that value to VDPAU as
>> NumLongTermPictureSliceHeaderBits.
>
>I've got an implementation of bit counting that just calculates that
>difference (which is how the existing code counts the short term ref
>bits) but I can't find any samples that actually use long term refs, so
>I can't verify it. Although the interlacing fix is imperfect, it's good
>enough for me to verify visual correctness of reference handling. Short
>term refs seem to be working - it's just a matter of long term now.

That is exciting news. Hopefully we can get the interlacing fix figured
out soon.

Recent versions of VDPAU from fd.o should have API trace support for
H.265/HEVC. If you are able to share an API trace and a video file I may
be able to take a closer look.

Thanks,
--José

>Thanks,
>
>--phil
>_______________________________________________
>VDPAU mailing list
>VDPAU at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/vdpau



More information about the VDPAU mailing list