1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-06-25 14:23:15 +02: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:
Decai Lin
2019-03-20 17:14:47 +08:00
committed by Mark Thompson
parent 1e34014010
commit ec1e4a8baf
5 changed files with 74 additions and 4 deletions

View File

@ -329,9 +329,16 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
sps->level_idc = avctx->level;
} else {
const H264LevelDescriptor *level;
int framerate;
if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
framerate = avctx->framerate.num / avctx->framerate.den;
else
framerate = 0;
level = ff_h264_guess_level(sps->profile_idc,
avctx->bit_rate,
framerate,
priv->mb_width * 16,
priv->mb_height * 16,
priv->dpb_frames);