OSDN Git Service

h264_ps: export actual height in MBs as SPS.mb_height
authorAnton Khirnov <anton@khirnov.net>
Sat, 2 Jul 2016 14:48:26 +0000 (16:48 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 11 Jul 2016 14:29:57 +0000 (16:29 +0200)
commita8cbe5a0ccebf60a8a8b0aba5d5716dd54c1595c
tree95f33fe4d224c4a718bb204c02dbc25028fc42a8
parent99cf943339a2e5171863c48cd1a73dd43dc243e1
h264_ps: export actual height in MBs as SPS.mb_height

Currently, SPS.mb_height is actually what the spec calls
PicHeightInMapUnits, which is half the frame height when interlacing is
allowed. Calling this 'mb_height' is quite confusing, and there are at
least two associated bugs where this field is treated as the actual
frame height - in the h264 parser and in the code computing maximum
reordering buffer size for a given level.

Fix those issues (and avoid possible future ones) by exporting the real
frame height in this field.
libavcodec/h264_ps.c
libavcodec/h264_ps.h
libavcodec/h264_slice.c