[mythtv] Typo in ffmpeg h264 parser?

John Pilkington johnpilk222 at gmail.com
Thu Apr 26 11:45:40 UTC 2018


On 26/04/18 11:06, Jean-Yves Avenard wrote:
> 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)

Thanks, JY.  I have it in my downloads folder.  Good soporific stuff.

I'm running with the patch and have seen no problems as yet. 
Experiments in progress.

John
> 
> 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 
>> <mailto: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


More information about the mythtv-dev mailing list