Lines Matching refs:bitbuf

225 static void set_hdr_segmentation(Vp8ePutBitBuf *bitbuf, Vp8ePps *ppss,  in set_hdr_segmentation()  argument
244 vp8e_put_lit(bitbuf, sgm->map_modified, 1); in set_hdr_segmentation()
245 vp8e_put_lit(bitbuf, data_modified, 1); in set_hdr_segmentation()
248 vp8e_put_lit(bitbuf, 1, 1); in set_hdr_segmentation()
252 vp8e_put_lit(bitbuf, 1, 1); in set_hdr_segmentation()
253 vp8e_put_lit(bitbuf, MPP_ABS(tmp), 7); in set_hdr_segmentation()
254 vp8e_put_lit(bitbuf, tmp < 0, 1); in set_hdr_segmentation()
259 vp8e_put_lit(bitbuf, 1, 1); in set_hdr_segmentation()
260 vp8e_put_lit(bitbuf, MPP_ABS(tmp), 6); in set_hdr_segmentation()
261 vp8e_put_lit(bitbuf, tmp < 0, 1); in set_hdr_segmentation()
280 vp8e_put_lit(bitbuf, 1, 1); in set_hdr_segmentation()
281 vp8e_put_lit(bitbuf, entropy->segment_prob[i], 8); in set_hdr_segmentation()
283 vp8e_put_lit(bitbuf, 0, 1); in set_hdr_segmentation()
292 static void set_filter_level_delta(Vp8ePutBitBuf *bitbuf, Vp8eSps *sps) in set_filter_level_delta() argument
309 vp8e_put_lit(bitbuf, update, 1); in set_filter_level_delta()
314 vp8e_put_lit(bitbuf, ref_update[i], 1); in set_filter_level_delta()
317 vp8e_put_lit(bitbuf, MPP_ABS(tmp), 6); in set_filter_level_delta()
318 vp8e_put_lit(bitbuf, tmp < 0, 1); in set_filter_level_delta()
323 vp8e_put_lit(bitbuf, mode_update[i], 1); in set_filter_level_delta()
326 vp8e_put_lit(bitbuf, MPP_ABS(tmp), 6); in set_filter_level_delta()
327 vp8e_put_lit(bitbuf, tmp < 0, 1); in set_filter_level_delta()
342 Vp8ePutBitBuf *bitbuf = &ctx->bitbuf[1]; in set_frame_header() local
347 vp8e_put_lit(bitbuf, sps->color_type, 1); in set_frame_header()
349 vp8e_put_lit(bitbuf, sps->clamp_type, 1); in set_frame_header()
352 vp8e_put_lit(bitbuf, pps->segment_enabled, 1); in set_frame_header()
354 set_hdr_segmentation(bitbuf, &ctx->ppss, entropy); in set_frame_header()
356 vp8e_put_lit(bitbuf, sps->filter_type, 1); in set_frame_header()
358 vp8e_put_lit(bitbuf, sps->filter_level, 6); in set_frame_header()
360 vp8e_put_lit(bitbuf, sps->filter_sharpness, 3); in set_frame_header()
362 vp8e_put_lit(bitbuf, sps->filter_delta_enable, 1); in set_frame_header()
369 set_filter_level_delta(bitbuf, sps); in set_frame_header()
372 vp8e_put_lit(bitbuf, sps->dct_partitions, 2); in set_frame_header()
374 vp8e_put_lit(bitbuf, ctx->rc->qp_hdr, 7); in set_frame_header()
376 vp8e_put_lit(bitbuf, 0, 1); in set_frame_header()
377 vp8e_put_lit(bitbuf, 0, 1); in set_frame_header()
378 vp8e_put_lit(bitbuf, 0, 1); in set_frame_header()
379 vp8e_put_lit(bitbuf, 0, 1); in set_frame_header()
380 vp8e_put_lit(bitbuf, 0, 1); in set_frame_header()
385 vp8e_put_lit(bitbuf, cur_pic->grf, 1); /* Grf refresh */ in set_frame_header()
386 vp8e_put_lit(bitbuf, cur_pic->arf, 1); /* Arf refresh */ in set_frame_header()
390 vp8e_put_lit(bitbuf, 1, 2); /* Ipf -> grf */ in set_frame_header()
392 vp8e_put_lit(bitbuf, 2, 2); /* Arf -> grf */ in set_frame_header()
394 vp8e_put_lit(bitbuf, 0, 2); /* Not updated */ in set_frame_header()
400 vp8e_put_lit(bitbuf, 1, 2); /* Ipf -> arf */ in set_frame_header()
402 vp8e_put_lit(bitbuf, 2, 2); /* Grf -> arf */ in set_frame_header()
404 vp8e_put_lit(bitbuf, 0, 2); /* Not updated */ in set_frame_header()
408 vp8e_put_lit(bitbuf, sps->sing_bias[1], 1); /* Grf */ in set_frame_header()
409 vp8e_put_lit(bitbuf, sps->sing_bias[2], 1); /* Arf */ in set_frame_header()
412 vp8e_put_lit(bitbuf, sps->refresh_entropy, 1); in set_frame_header()
414 vp8e_put_lit(bitbuf, cur_pic->ipf, 1); in set_frame_header()
416 vp8e_calc_coeff_prob(bitbuf, &entropy->coeff_prob, &entropy->old_coeff_prob); in set_frame_header()
417 vp8e_put_lit(bitbuf, 1, 1); in set_frame_header()
418 vp8e_put_lit(bitbuf, entropy->skip_false_prob, 8); in set_frame_header()
423 vp8e_put_lit(bitbuf, entropy->intra_prob, 8); in set_frame_header()
424 vp8e_put_lit(bitbuf, entropy->last_prob, 8); in set_frame_header()
425 vp8e_put_lit(bitbuf, entropy->gf_prob, 8); in set_frame_header()
426 vp8e_put_lit(bitbuf, 0, 1); in set_frame_header()
427 vp8e_put_lit(bitbuf, 0, 1); in set_frame_header()
428 vp8e_calc_mv_prob(bitbuf, &entropy->mv_prob, &entropy->old_mv_prob); in set_frame_header()
446 hw_cfg->output_strm_offset += ctx->bitbuf[1].byte_cnt; in set_new_frame()
452 RK_U8 *pTmp = (RK_U8 *)((size_t)(ctx->bitbuf[1].data) & (~0x07)); in set_new_frame()
569 hw_cfg->bool_enc_value = ctx->bitbuf[1].bottom; in set_new_frame()
570 hw_cfg->bool_enc_value_bits = 24 - ctx->bitbuf[1].bits_left; in set_new_frame()
571 hw_cfg->bool_enc_range = ctx->bitbuf[1].range; in set_new_frame()
868 Vp8ePutBitBuf *bitbuf = &ctx->bitbuf[0]; in set_frame_tag() local
874 tmp = ((ctx->bitbuf[1].byte_cnt) << 5) | in set_frame_tag()
879 vp8e_put_byte(bitbuf, tmp & 0xff); in set_frame_tag()
881 vp8e_put_byte(bitbuf, (tmp >> 8) & 0xff); in set_frame_tag()
883 vp8e_put_byte(bitbuf, (tmp >> 16) & 0xff); in set_frame_tag()
888 vp8e_put_byte(bitbuf, 0x9d); in set_frame_tag()
889 vp8e_put_byte(bitbuf, 0x01); in set_frame_tag()
890 vp8e_put_byte(bitbuf, 0x2a); in set_frame_tag()
905 vp8e_put_byte(bitbuf, tmp & 0xff); in set_frame_tag()
906 vp8e_put_byte(bitbuf, tmp >> 8); in set_frame_tag()
909 vp8e_put_byte(bitbuf, tmp & 0xff); in set_frame_tag()
910 vp8e_put_byte(bitbuf, tmp >> 8); in set_frame_tag()
924 Vp8ePutBitBuf *bitbuf = ctx->bitbuf; in set_data_part_size() local
925 RK_S32 tmp = bitbuf[i].data - bitbuf[i].p_data; in set_data_part_size()
926 vp8e_put_byte(&bitbuf[1], tmp & 0xff); in set_data_part_size()
927 vp8e_put_byte(&bitbuf[1], (tmp >> 8) & 0xff); in set_data_part_size()
928 vp8e_put_byte(&bitbuf[1], (tmp >> 16) & 0xff); in set_data_part_size()
1412 vp8e_set_buffer(&ctx->bitbuf[0], p_start, p_end - p_start); in hal_vp8e_enc_strm_code()
1421 vp8e_set_buffer(&ctx->bitbuf[1], p_start, p_end - p_start); in hal_vp8e_enc_strm_code()
1430 vp8e_set_buffer(&ctx->bitbuf[2], p_start, p_end - p_start); in hal_vp8e_enc_strm_code()
1542 ctx->bitbuf[1].byte_cnt += part[0] - hw_offset; in hal_vp8e_update_buffers()
1543 ctx->bitbuf[1].data += part[0] - hw_offset; in hal_vp8e_update_buffers()
1545 ctx->bitbuf[2].byte_cnt = part[1]; in hal_vp8e_update_buffers()
1546 ctx->bitbuf[2].data += part[1]; in hal_vp8e_update_buffers()
1547 ctx->bitbuf[3].byte_cnt = part[2]; in hal_vp8e_update_buffers()
1548 ctx->bitbuf[3].data += part[2]; in hal_vp8e_update_buffers()
1552 if (vp8e_buffer_gap(&ctx->bitbuf[1], 4) == MPP_OK) { in hal_vp8e_update_buffers()
1558 ctx->p_out_buf[0] = (RK_U32 *)ctx->bitbuf[0].p_data; in hal_vp8e_update_buffers()
1559 ctx->p_out_buf[1] = (RK_U32 *)ctx->bitbuf[2].p_data; in hal_vp8e_update_buffers()
1561 ctx->p_out_buf[2] = (RK_U32 *)ctx->bitbuf[3].p_data; in hal_vp8e_update_buffers()
1563 ctx->stream_size[0] = ctx->bitbuf[0].byte_cnt + in hal_vp8e_update_buffers()
1564 ctx->bitbuf[1].byte_cnt; in hal_vp8e_update_buffers()
1565 ctx->stream_size[1] = ctx->bitbuf[2].byte_cnt; in hal_vp8e_update_buffers()
1568 ctx->stream_size[2] = ctx->bitbuf[3].byte_cnt; in hal_vp8e_update_buffers()