Lines Matching refs:coef

354 static void set_coef(void *ctx, RK_S32 *coef, RK_S32 val)  in set_coef()  argument
362 *coef = val + 0; in set_coef()
365 *coef = val + 10; in set_coef()
367 *coef = val + 25; in set_coef()
370 *coef = val + 25; in set_coef()
372 *coef = val + 35; in set_coef()
375 *coef = val + 35; in set_coef()
377 *coef = val + 51; in set_coef()
381 *coef = val + 35; in set_coef()
383 *coef = val + 51; in set_coef()
385 *coef = val + 64; in set_coef()
389 *coef = val + 64; in set_coef()
391 *coef = val + 72; in set_coef()
393 *coef = val + 72; in set_coef()
395 *coef = val + 80; in set_coef()
630 RK_S32 coef = 1024; in smt_calc_coef() local
637 set_coef(ctx, &coef, 0); in smt_calc_coef()
640 set_coef(ctx, &coef, 102); in smt_calc_coef()
642 set_coef(ctx, &coef, 154); in smt_calc_coef()
645 set_coef(ctx, &coef, 154); in smt_calc_coef()
648 set_coef(ctx, &coef, 205); in smt_calc_coef()
650 set_coef(ctx, &coef, 256); in smt_calc_coef()
652 set_coef(ctx, &coef, 307); in smt_calc_coef()
654 set_coef(ctx, &coef, 307); in smt_calc_coef()
658 set_coef(ctx, &coef, 307); in smt_calc_coef()
660 set_coef(ctx, &coef, 358); in smt_calc_coef()
662 set_coef(ctx, &coef, 410); in smt_calc_coef()
665 set_coef(ctx, &coef, 358); in smt_calc_coef()
667 set_coef(ctx, &coef, 410); in smt_calc_coef()
669 set_coef(ctx, &coef, 461); in smt_calc_coef()
671 set_coef(ctx, &coef, 461); in smt_calc_coef()
675 set_coef(ctx, &coef, 410); in smt_calc_coef()
677 set_coef(ctx, &coef, 461); in smt_calc_coef()
679 set_coef(ctx, &coef, 512); in smt_calc_coef()
682 set_coef(ctx, &coef, 512); in smt_calc_coef()
684 set_coef(ctx, &coef, 563); in smt_calc_coef()
686 set_coef(ctx, &coef, 614); in smt_calc_coef()
688 set_coef(ctx, &coef, 614); in smt_calc_coef()
690 set_coef(ctx, &coef, 666); in smt_calc_coef()
692 set_coef(ctx, &coef, 768); in smt_calc_coef()
694 set_coef(ctx, &coef, 900); in smt_calc_coef()
696 if (coef > 1024) in smt_calc_coef()
697 coef = 1024; in smt_calc_coef()
699 if (coef >= 900) in smt_calc_coef()
701 else if (coef >= 307) // 0.7~0.3 --> 1.0~0.5 in smt_calc_coef()
702 coef2 = 512 + (coef - 307) * (1024 - 512) / (717 - 307); in smt_calc_coef()
704 coef2 = 0 + coef * (512 - 0) / (307 - 0); in smt_calc_coef()
772 RK_S32 coef = smt_calc_coef(p); in derive_pframe_qp_by_bitrate() local
780 bits_target_use = ((RK_S64)m_tbr * coef + (RK_S64)p->bits_tgt_lower * 1024) >> 10; in derive_pframe_qp_by_bitrate()
781 pre_diff_bit_use = ((RK_S64)m_dbr * coef + (RK_S64)p->pre_diff_bit_lower * 1024) >> 10; in derive_pframe_qp_by_bitrate()
789 p->frm_num, bits_target_use, m_tbr, coef, p->bits_tgt_lower, in derive_pframe_qp_by_bitrate()
815 pre_diff_bit_use = ((RK_S64)m_dbr * coef + (RK_S64)p->pre_diff_bit_lower * 1024) >> 10; in derive_pframe_qp_by_bitrate()
818 coef += pre_diff_bit_use <= 2 * bits_target_use ? 205 : in derive_pframe_qp_by_bitrate()
821 if (coef >= 1024 || qp_out > LOW_LOW_QP) in derive_pframe_qp_by_bitrate()
822 coef = 1024; in derive_pframe_qp_by_bitrate()
824 p->frm_num, pre_diff_bit_use, bits_target_use, coef); in derive_pframe_qp_by_bitrate()
826 pre_diff_bit_use = ((RK_S64)m_dbr * coef + (RK_S64)p->pre_diff_bit_lower * 1024) >> 10; in derive_pframe_qp_by_bitrate()
827 bits_target_use = ((RK_S64)m_tbr * coef + (RK_S64)p->bits_tgt_lower * 1024) >> 10; in derive_pframe_qp_by_bitrate()