Lines Matching refs:sRCParams
135 ctx->sRCParams.RCEnable = IMG_TRUE;
136 ctx->sRCParams.bDisableBitStuffing = IMG_FALSE;
139 ctx->sRCParams.RCEnable = IMG_TRUE;
140 ctx->sRCParams.bDisableBitStuffing = IMG_TRUE;
143 ctx->sRCParams.RCEnable = IMG_FALSE;
144 ctx->sRCParams.bDisableBitStuffing = IMG_FALSE;
147 ctx->sRCParams.RCEnable = IMG_TRUE;
148 ctx->sRCParams.bDisableBitStuffing = IMG_FALSE;
160 ctx->sRCParams.FrameRate = 30;
226 if(ctx->sRCParams.FrameRate == 0)
227 ctx->sRCParams.FrameRate = 30;
239 ctx->sRCParams.bBitrateChanged =
240 (pSequenceParams->bits_per_second == ctx->sRCParams.BitsPerSecond ?
244 ctx->sRCParams.BitsPerSecond = TOPAZ_H264_MAX_BITRATE;
253 max_bps = (ctx->Width * ctx->Height * 3 / 2 ) * 8 * ctx->sRCParams.FrameRate;
260 ctx->Width, ctx->Height, ctx->sRCParams.FrameRate);
265 ctx->sRCParams.BitsPerSecond = max_bps;
275 ctx->sRCParams.BitsPerSecond = pSequenceParams->bits_per_second;
278 /*if (ctx->sRCParams.IntraFreq != pSequenceParams->intra_period)
279 ctx->sRCParams.bBitrateChanged = IMG_TRUE;*/
280 ctx->sRCParams.IDRFreq = pSequenceParams->intra_idr_period;
282 ctx->sRCParams.Slices = ctx->Slices;
283 ctx->sRCParams.QCPOffset = 0;
285 if (ctx->sRCParams.IntraFreq != pSequenceParams->intra_period
287 && ctx->sRCParams.IntraFreq != 0
288 && ((ctx->obj_context->frame_count + 1) % ctx->sRCParams.IntraFreq) != 0
289 && (!ctx->sRCParams.bDisableFrameSkipping)) {
298 ctx->sRCParams.IntraFreq = pSequenceParams->intra_period;
300 frame_size = ctx->sRCParams.BitsPerSecond / ctx->sRCParams.FrameRate;
304 ctx->sRCParams.BufferSize = ctx->buffer_size;
305 ctx->sRCParams.InitialLevel = ctx->buffer_size - ctx->initial_buffer_fullness;
306 ctx->sRCParams.InitialDelay = ctx->initial_buffer_fullness;
309 ctx->buffer_size = ctx->sRCParams.BitsPerSecond;
310 ctx->initial_buffer_fullness = ctx->sRCParams.BitsPerSecond;
311 ctx->sRCParams.BufferSize = ctx->buffer_size;
312 ctx->sRCParams.InitialLevel = (3 * ctx->sRCParams.BufferSize) >> 4;
314 ctx->sRCParams.InitialLevel += (frame_size / 2);
315 ctx->sRCParams.InitialLevel /= frame_size;
316 ctx->sRCParams.InitialLevel *= frame_size;
317 ctx->sRCParams.InitialDelay = ctx->buffer_size - ctx->sRCParams.InitialLevel;
325 pVUI_Params->bit_rate_value_minus1 = ctx->sRCParams.BitsPerSecond / 64 - 1;
326 pVUI_Params->cbp_size_value_minus1 = ctx->sRCParams.BufferSize / 64 - 1;
328 ctx->sRCParams.bDisableBitStuffing ||
329 ctx->sRCParams.bDisableFrameSkipping)
347 pVUI_Params->Time_Scale = ctx->sRCParams.FrameRate * 2;
418 if (ctx->sRCParams.IDRFreq != 0) {
452 90000 * (1.0 * ctx->sRCParams.InitialDelay / ctx->sRCParams.BitsPerSecond);
454 90000 * (1.0 * ctx->buffer_size / ctx->sRCParams.BitsPerSecond)
509 ctx->sRCParams.IDRFreq * ctx->sRCParams.IntraFreq * 2;
621 if ((ctx->sRCParams.IntraFreq != 0) && (ctx->sRCParams.IDRFreq != 0)) { /* period IDR is desired */
627 if ((ctx->obj_context->frame_count % ctx->sRCParams.IntraFreq) == 0) {
629 intra_cnt = ctx->obj_context->frame_count / ctx->sRCParams.IntraFreq;
633 if ((is_intra) && ((intra_cnt % ctx->sRCParams.IDRFreq) == 0)) {
679 pnw__H264_prepare_picture_header(cmdbuf->header_mem_p + ctx->pic_header_ofs, IMG_FALSE, ctx->sRCParams.QCPOffset);
745 is_intra = (ctx->sRCParams.RCEnable && ctx->sRCParams.FrameSkip) ? 0 : pBuffer->slice_flags.bits.is_intra;
781 if (!(ctx->sRCParams.RCEnable && ctx->sRCParams.FrameSkip)) {
918 ctx->sRCParams.Slices = obj_buffer->num_elements;
1020 if (ctx->sRCParams.FrameRate == frame_rate_param->framerate)
1024 ctx->sRCParams.FrameRate,
1026 ctx->sRCParams.FrameRate = frame_rate_param->framerate;
1027 ctx->sRCParams.bBitrateChanged = IMG_TRUE;
1029 ctx->sRCParams.FrameRate = (frame_rate_param->framerate < 1) ? 1 :
1041 ctx->sRCParams.bDisableFrameSkipping = IMG_TRUE;
1043 ctx->sRCParams.bDisableBitStuffing = IMG_TRUE;
1046 ctx->sRCParams.bDisableFrameSkipping, ctx->sRCParams.bDisableBitStuffing);
1066 rate_control_param->bits_per_second == ctx->sRCParams.BitsPerSecond) &&
1068 ctx->sRCParams.BufferSize == ctx->sRCParams.BitsPerSecond / 1000 * rate_control_param->window_size) &&
1069 (ctx->sRCParams.MinQP == rate_control_param->min_qp) &&
1070 (ctx->sRCParams.InitialQp == rate_control_param->initial_qp) &&
1072 ctx->sRCParams.BUSize == rate_control_param->basic_unit_size)) {
1078 ctx->sRCParams.bBitrateChanged = IMG_TRUE;
1095 ctx->sRCParams.BitsPerSecond,
1098 max_bps = (ctx->Width * ctx->Height * 3 / 2 ) * 8 * ctx->sRCParams.FrameRate;
1105 ctx->Width, ctx->Height, ctx->sRCParams.FrameRate);
1110 ctx->sRCParams.BitsPerSecond = max_bps;
1119 ctx->sRCParams.BitsPerSecond = rate_control_param->bits_per_second;
1124 ctx->sRCParams.MinQP = rate_control_param->min_qp;
1126 ctx->sRCParams.BufferSize =
1127 ctx->sRCParams.BitsPerSecond / 1000 * rate_control_param->window_size;
1128 if (ctx->sRCParams.FrameRate == 0) {
1130 ctx->sRCParams.FrameRate = 30;
1133 frame_size = ctx->sRCParams.BitsPerSecond / ctx->sRCParams.FrameRate;
1136 ctx->sRCParams.BitsPerSecond);
1139 ctx->sRCParams.InitialLevel = (3 * ctx->sRCParams.BufferSize) >> 4;
1140 ctx->sRCParams.InitialLevel += (frame_size / 2);
1141 ctx->sRCParams.InitialLevel /= frame_size;
1142 ctx->sRCParams.InitialLevel *= frame_size;
1143 ctx->sRCParams.InitialDelay =
1144 ctx->sRCParams.BufferSize - ctx->sRCParams.InitialLevel;
1148 ctx->sRCParams.InitialQp = rate_control_param->initial_qp;
1150 ctx->sRCParams.BUSize = rate_control_param->basic_unit_size;
1225 if (!ctx->sRCParams.RCEnable) {
1332 psPicParams->NumSlices = ctx->sRCParams.Slices;