mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
lavc/h264_levels: add MaxMBPS checking and update fate test.
1. add MaxMBPS checking for level idc setting to align with AVC spec AnnexA table A-1/A-6 level limits. 2. update h264 level fate test. Signed-off-by: Decai Lin <decai.lin@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
parent
1e34014010
commit
ec1e4a8baf
5 changed files with 74 additions and 4 deletions
|
|
@ -89,6 +89,7 @@ const H264LevelDescriptor *ff_h264_get_level(int level_idc,
|
|||
|
||||
const H264LevelDescriptor *ff_h264_guess_level(int profile_idc,
|
||||
int64_t bitrate,
|
||||
int framerate,
|
||||
int width, int height,
|
||||
int max_dec_frame_buffering)
|
||||
{
|
||||
|
|
@ -120,6 +121,9 @@ const H264LevelDescriptor *ff_h264_guess_level(int profile_idc,
|
|||
FFMIN(level->max_dpb_mbs / (width_mbs * height_mbs), 16);
|
||||
if (max_dec_frame_buffering > max_dpb_frames)
|
||||
continue;
|
||||
|
||||
if (framerate > (level->max_mbps / (width_mbs * height_mbs)))
|
||||
continue;
|
||||
}
|
||||
|
||||
return level;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue