[VDPAU] ffmpeg and HEVC: NumLongTermPicturesSlcieHeaderBits

Philip Langdale philipl at overt.org
Tue May 26 20:58:34 PDT 2015


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=df6cce6
> >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.

Thanks,

--phil


More information about the VDPAU mailing list