diff options
author | Mark Thompson <sw@jkqxz.net> | 2019-05-06 16:21:29 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2019-06-03 21:16:22 +0100 |
commit | 2880a32c668023bfee4745095c885450d547ae45 (patch) | |
tree | 51a2060be287732efeb8df18980308325397e11f /libavcodec/vaapi_encode_h264.c | |
parent | 7056002796abc63c49421669c29f3cecfcdbebb4 (diff) |
vaapi_encode: Refactor encode misc parameter buffer creation
This removes the use of the nonstandard combined structures, which
generated some warnings with clang and will cause alignment problems
with some parameter buffer types.
Diffstat (limited to 'libavcodec/vaapi_encode_h264.c')
-rw-r--r-- | libavcodec/vaapi_encode_h264.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 4cf99d7c78..d1427112ea 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -471,9 +471,9 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) (ctx->va_bit_rate >> hrd->bit_rate_scale + 6) - 1; hrd->cpb_size_scale = - av_clip_uintp2(av_log2(ctx->hrd_params.hrd.buffer_size) - 15 - 4, 4); + av_clip_uintp2(av_log2(ctx->hrd_params.buffer_size) - 15 - 4, 4); hrd->cpb_size_value_minus1[0] = - (ctx->hrd_params.hrd.buffer_size >> hrd->cpb_size_scale + 4) - 1; + (ctx->hrd_params.buffer_size >> hrd->cpb_size_scale + 4) - 1; // CBR mode as defined for the HRD cannot be achieved without filler // data, so this flag cannot be set even with VAAPI CBR modes. @@ -488,8 +488,8 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) // This calculation can easily overflow 32 bits. bp->nal.initial_cpb_removal_delay[0] = 90000 * - (uint64_t)ctx->hrd_params.hrd.initial_buffer_fullness / - ctx->hrd_params.hrd.buffer_size; + (uint64_t)ctx->hrd_params.initial_buffer_fullness / + ctx->hrd_params.buffer_size; bp->nal.initial_cpb_removal_delay_offset[0] = 0; } else { sps->vui.nal_hrd_parameters_present_flag = 0; |