[mythtv] Typo in ffmpeg h264 parser?

Jean-Yves Avenard jyavenard at gmail.com
Thu Apr 26 10:06:03 UTC 2018


You may be right…

If you check ITU H264 (04/2017) (I can make this document available to you if you don’t have it)

7.3.2.13 Slice layer extension RBSP syntax

there you’ll find the whole slice header syntax.

What ffmpeg calls reordering_of_pic_nums_idc is in the spec num_ref_idx_10_active_minus1, per the spec, that value is either between 0-7 or 0-15.. There’s an exception where it can be 0 to 31. So anything over 31 would be an error

You should ask that in #ffmpeg-devel

JY

> On 25 Apr 2018, at 9:14 pm, John Pilkington <johnpilk222 at gmail.com> wrote:
> 
> Hello:  When I feed h264 from UK DVB-T2 recordings into ffmpeg I almost always get error reports of 'illegal reordering of pic_nums_idc' or 'reference count overflow.' I'm running 30-pre-579
> 
> These reports apparently come from libavcodec/h264_parser.c, lines 186 and 194, and the if/else if combination at lines 182/184 looks very strange.
> 
>                   unsigned int reordering_of_pic_nums_idc = get_ue_golomb_31(gb);
> 
>                    if (reordering_of_pic_nums_idc < 3)
>                        get_ue_golomb_long(gb);
>                    else if (reordering_of_pic_nums_idc > 3) {
> 
> while libavcodec/golomb.h has this at line 82:
> 
> /**
> * read unsigned exp golomb code, constraint to a max of 31.
> * the return value is undefined if the stored value exceeds 31.
> */
> static inline int get_ue_golomb_31(GetBitContext *gb)
> {
> 
> I think that the '3' in the 'else if' line in the parser should be 31; any comments?  Suggested action?  I haven't yet tried a patch.
> 
> John P
> 
> 
> 
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20180426/dc354d42/attachment.html>


More information about the mythtv-dev mailing list