Home | History | Annotate | Download | only in encoder

Lines Matching defs:ps_cabac_ctxt

104  * @param[in] ps_cabac_ctxt
118 cabac_ctxt_t *ps_cabac_ctxt,
124 a = ((ps_cabac_ctxt->ps_left_ctxt_mb_info->u1_mb_type & CAB_SKIP_MASK) ?
126 b = ((ps_cabac_ctxt->ps_top_ctxt_mb_info->u1_mb_type & CAB_SKIP_MASK) ?
131 ih264e_cabac_encode_bin(ps_cabac_ctxt,
133 ps_cabac_ctxt->au1_cabac_ctxt_table + u4_ctxidx_offset
179 * @param[in] ps_cabac_ctxt
195 cabac_ctxt_t *ps_cabac_ctxt,
199 encoding_envirnoment_t *ps_cab_enc_env = &(ps_cabac_ctxt->s_cab_enc_env);
202 mb_info_ctxt_t *ps_left_ctxt = ps_cabac_ctxt->ps_left_ctxt_mb_info;
203 mb_info_ctxt_t *ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
215 pu1_mb_bin_ctxt = ps_cabac_ctxt->au1_cabac_ctxt_table + u4_ctx_idx_offset;
223 if (ps_left_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
225 if (ps_top_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
303 ih264e_cabac_put_byte(ps_cabac_ctxt);
320 * @param[in] ps_cabac_ctxt
334 static void ih264e_cabac_enc_4x4mb_modes(cabac_ctxt_t *ps_cabac_ctxt,
345 ih264e_cabac_encode_bin(ps_cabac_ctxt,
347 ps_cabac_ctxt->au1_cabac_ctxt_table
357 ps_cabac_ctxt->au1_cabac_ctxt_table
359 ps_cabac_ctxt);
365 ih264e_cabac_encode_bin(ps_cabac_ctxt,
367 ps_cabac_ctxt->au1_cabac_ctxt_table
376 ps_cabac_ctxt->au1_cabac_ctxt_table
378 ps_cabac_ctxt);
394 * @param[in] ps_cabac_ctxt
405 cabac_ctxt_t *ps_cabac_ctxt)
409 mb_info_ctxt_t *ps_curr_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info;
410 mb_info_ctxt_t *ps_left_ctxt = ps_cabac_ctxt->ps_left_ctxt_mb_info;
411 mb_info_ctxt_t *ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
447 ps_cabac_ctxt->au1_cabac_ctxt_table
449 ps_cabac_ctxt);
463 * @param[in] ps_cabac_ctxt
473 static void ih264e_cabac_enc_cbp(UWORD32 u4_cbp, cabac_ctxt_t *ps_cabac_ctxt)
475 mb_info_ctxt_t *ps_left_ctxt = ps_cabac_ctxt->ps_left_ctxt_mb_info;
476 mb_info_ctxt_t *ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
554 ps_cabac_ctxt->au1_cabac_ctxt_table + CBP_LUMA,
555 ps_cabac_ctxt);
568 * @param[in] ps_cabac_ctxt
579 cabac_ctxt_t *ps_cabac_ctxt)
601 u1_ctxt_inc = (!(!(ps_cabac_ctxt->i1_prevps_mb_qp_delta_ctxt)));
602 ps_cabac_ctxt->i1_prevps_mb_qp_delta_ctxt = i1_mb_qp_delta;
610 ih264e_cabac_encode_bin(ps_cabac_ctxt,
612 ps_cabac_ctxt->au1_cabac_ctxt_table + MB_QP_DELTA
628 ps_cabac_ctxt->au1_cabac_ctxt_table + MB_QP_DELTA,
629 ps_cabac_ctxt);
653 ps_cabac_ctxt->au1_cabac_ctxt_table
655 ps_cabac_ctxt);
668 ps_cabac_ctxt->au1_cabac_ctxt_table
670 ps_cabac_ctxt);
687 ps_cabac_ctxt->au1_cabac_ctxt_table
689 ps_cabac_ctxt);
721 * @param[in] ps_cabac_ctxt
736 cabac_ctxt_t *ps_cabac_ctxt)
765 ih264e_cabac_encode_bin(ps_cabac_ctxt, u1_bin, pu1_bin_ctxt);
831 u4_ctx_inc, 1, ps_cabac_ctxt->au1_cabac_ctxt_table
833 ps_cabac_ctxt);
841 ih264e_cabac_encode_bypass_bins(ps_cabac_ctxt, u4_bins,
852 u4_ctx_inc, 1, ps_cabac_ctxt->au1_cabac_ctxt_table
854 ps_cabac_ctxt);
859 ih264e_cabac_encode_bypass_bin(ps_cabac_ctxt, u1_sign);
888 cabac_ctxt_t *ps_cabac_ctxt = ps_ent_ctxt->ps_cabac;
897 mb_info_ctxt_t *ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
898 mb_info_ctxt_t *p_CurCtxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info;
909 u1_a = ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] & 0x1;
913 ih264e_cabac_encode_bin(ps_cabac_ctxt,
915 ps_cabac_ctxt->au1_cabac_ctxt_table + CBF
927 ps_cabac_ctxt->au1_cabac_ctxt_table
930 ps_cabac_ctxt);
932 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] |= 0x1;
937 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x6;
969 cabac_ctxt_t *ps_cabac_ctxt = ps_ent_ctxt->ps_cabac;
977 ps_top_ctxt_mb_info = ps_cabac_ctxt->ps_top_ctxt_mb_info;
978 ps_curr_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info;
987 u1_left_dc_csbp = (ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0]) >> 1;
1002 ih264e_cabac_encode_bin(ps_cabac_ctxt,
1004 ps_cabac_ctxt->au1_cabac_ctxt_table + CBF
1017 ps_cabac_ctxt->au1_cabac_ctxt_table
1020 ps_cabac_ctxt);
1034 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x1;
1036 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] |= (u1_left_dc_csbp << 1);
1047 u1_left_ac_csbp = ps_cabac_ctxt->pu1_left_uv_ac_csbp[0];
1071 ih264e_cabac_encode_bin(ps_cabac_ctxt,
1073 ps_cabac_ctxt->au1_cabac_ctxt_table + CBF
1086 ps_cabac_ctxt->au1_cabac_ctxt_table
1089 ps_cabac_ctxt);
1104 ps_cabac_ctxt->pu1_left_uv_ac_csbp[0] = u1_left_ac_csbp;
1110 ps_cabac_ctxt->pu1_left_uv_ac_csbp[0] = 0;
1145 cabac_ctxt_t *ps_cabac_ctxt = ps_ent_ctxt->ps_cabac;
1157 ps_curr_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info;
1158 ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
1159 u1_left_ac_csbp = ps_cabac_ctxt->pu1_left_y_ac_csbp[0];
1224 ih264e_cabac_encode_bin(ps_cabac_ctxt,
1226 ps_cabac_ctxt->au1_cabac_ctxt_table + CBF
1240 ps_cabac_ctxt->au1_cabac_ctxt_table
1243 ps_cabac_ctxt);
1258 ps_cabac_ctxt->pu1_left_y_ac_csbp[0] = u1_left_ac_csbp & 0xf;
1265 ps_cabac_ctxt->pu1_left_y_ac_csbp[0] = 0;
1281 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x1;
1283 ps_cabac_ctxt->pu1_left_uv_ac_csbp[0] = 0;
1303 * @param[in] ps_cabac_ctxt
1315 cabac_ctxt_t *ps_cabac_ctxt)
1347 ih264e_cabac_encode_bin(ps_cabac_ctxt,
1349 ps_cabac_ctxt->au1_cabac_ctxt_table + u4_ctx_idx_offset
1366 ps_cabac_ctxt->au1_cabac_ctxt_table
1368 ps_cabac_ctxt);
1396 ih264e_cabac_encode_bypass_bins(ps_cabac_ctxt, u4_bins,
1426 ps_cabac_ctxt->au1_cabac_ctxt_table
1428 ps_cabac_ctxt);
1432 ih264e_cabac_encode_bypass_bin(ps_cabac_ctxt, 0);
1434 ih264e_cabac_encode_bypass_bin(ps_cabac_ctxt, 1);
1443 * @param[in] ps_cabac_ctxt
1456 static void ih264e_cabac_enc_mvds_p16x16(cabac_ctxt_t *ps_cabac_ctxt,
1469 pu1_top_mv_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_mv[0];
1470 pu1_lft_mv_ctxt = ps_cabac_ctxt
1482 ps_cabac_ctxt);
1489 ps_cabac_ctxt);
1507 * @param[in] ps_cabac_ctxt
1520 static void ih264e_cabac_enc_mvds_b16x16(cabac_ctxt_t *ps_cabac_ctxt,
1533 pu1_top_mv_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_mv[0];
1534 pu1_lft_mv_ctxt = ps_cabac_ctxt->pu1_left_mv_ctxt_inc[0];
1547 ps_cabac_ctxt);
1554 ps_cabac_ctxt);
1578 ps_cabac_ctxt);
1585 ps_cabac_ctxt);
1624 cabac_ctxt_t *ps_cabac_ctxt = ps_ent_ctxt->ps_cabac;
1651 ps_curr_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info;
1670 ih264e_cabac_enc_intra_mb_type(ISLICE, luma_intra_mode, ps_cabac_ctxt,
1675 ih264e_cabac_enc_4x4mb_modes(ps_cabac_ctxt, pu1_byte);
1679 ih264e_cabac_enc_chroma_predmode(chroma_intra_mode, ps_cabac_ctxt);
1683 ih264e_cabac_enc_cbp(cbp, ps_cabac_ctxt);
1689 ih264e_cabac_enc_mb_qp_delta(mb_qp_delta, ps_cabac_ctxt);
1709 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x6;
1710 ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_yuv_dc_csbp &= 0x6;
1721 *(ps_cabac_ctxt->pu1_left_uv_ac_csbp) = 0;
1722 *(ps_cabac_ctxt->pu1_left_y_ac_csbp) = 0;
1723 *(ps_cabac_ctxt->pu1_left_yuv_dc_csbp) = 0;
1732 memset(ps_cabac_ctxt->pu1_left_mv_ctxt_inc, 0, 16);
1733 ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_cbp = cbp;
1773 cabac_ctxt_t *ps_cabac_ctxt = ps_ent_ctxt->ps_cabac;
1798 ps_curr_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info;
1812 ih264e_cabac_enc_mb_skip(0, ps_cabac_ctxt, MB_SKIP_FLAG_P_SLICE);
1826 ih264e_cabac_encode_bin(ps_cabac_ctxt,
1828 ps_cabac_ctxt->au1_cabac_ctxt_table
1832 ps_cabac_ctxt, MB_TYPE_P_SLICE);
1837 ih264e_cabac_enc_4x4mb_modes(ps_cabac_ctxt, pu1_byte);
1842 ih264e_cabac_enc_chroma_predmode(chroma_intra_mode, ps_cabac_ctxt);
1847 ih264e_cabac_enc_cbp(cbp, ps_cabac_ctxt);
1852 ih264e_cabac_enc_mb_qp_delta(mb_qp_delta, ps_cabac_ctxt);
1875 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x6;
1876 ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_yuv_dc_csbp &= 0x6;
1888 *(ps_cabac_ctxt->pu1_left_uv_ac_csbp) = 0;
1889 *(ps_cabac_ctxt->pu1_left_y_ac_csbp) = 0;
1890 *(ps_cabac_ctxt->pu1_left_yuv_dc_csbp) = 0;
1898 memset(ps_cabac_ctxt->pu1_left_mv_ctxt_inc, 0, 16);
1899 ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_cbp = (UWORD8) cbp;
1927 ih264e_cabac_enc_mb_skip(0, ps_cabac_ctxt, MB_SKIP_FLAG_P_SLICE);
1935 &(ps_cabac_ctxt->au1_cabac_ctxt_table[MB_TYPE_P_SLICE]),
1936 ps_cabac_ctxt);
1945 ih264e_cabac_enc_mvds_p16x16(ps_cabac_ctxt, pi2_mv_ptr);
1948 ih264e_cabac_enc_cbp(cbp, ps_cabac_ctxt);
1953 ih264e_cabac_enc_mb_qp_delta(mb_qp_delta, ps_cabac_ctxt);
1966 ih264e_cabac_enc_mb_skip(1, ps_cabac_ctxt, MB_SKIP_FLAG_P_SLICE);
1972 memset(ps_cabac_ctxt->pu1_left_mv_ctxt_inc, 0, 16);
1992 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x6;
1999 *(ps_cabac_ctxt->pu1_left_uv_ac_csbp) = 0;
2000 *(ps_cabac_ctxt->pu1_left_y_ac_csbp) = 0;
2001 *(ps_cabac_ctxt->pu1_left_yuv_dc_csbp) = 0;
2061 cabac_ctxt_t *ps_cabac_ctxt = ps_ent_ctxt->ps_cabac;
2086 ps_curr_ctxt = ps_cabac_ctxt->ps_curr_ctxt_mb_info;
2100 ih264e_cabac_enc_mb_skip(0, ps_cabac_ctxt, MB_SKIP_FLAG_B_SLICE);
2114 mb_info_ctxt_t *ps_left_ctxt = ps_cabac_ctxt->ps_left_ctxt_mb_info;
2115 mb_info_ctxt_t *ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
2118 if (ps_left_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
2121 if (ps_top_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
2131 ps_cabac_ctxt->au1_cabac_ctxt_table
2133 ps_cabac_ctxt);
2136 ps_cabac_ctxt, MB_TYPE_B_SLICE);
2142 ih264e_cabac_enc_4x4mb_modes(ps_cabac_ctxt, pu1_byte);
2147 ih264e_cabac_enc_chroma_predmode(chroma_intra_mode, ps_cabac_ctxt);
2152 ih264e_cabac_enc_cbp(cbp, ps_cabac_ctxt);
2157 ih264e_cabac_enc_mb_qp_delta(mb_qp_delta, ps_cabac_ctxt);
2180 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x6;
2181 ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_yuv_dc_csbp &= 0x6;
2193 *(ps_cabac_ctxt->pu1_left_uv_ac_csbp) = 0;
2194 *(ps_cabac_ctxt->pu1_left_y_ac_csbp) = 0;
2195 *(ps_cabac_ctxt->pu1_left_yuv_dc_csbp) = 0;
2203 memset(ps_cabac_ctxt->pu1_left_mv_ctxt_inc, 0, 16);
2204 ps_cabac_ctxt->ps_curr_ctxt_mb_info->u1_cbp = (UWORD8) cbp;
2233 ih264e_cabac_enc_mb_skip(0, ps_cabac_ctxt, MB_SKIP_FLAG_B_SLICE);
2239 ps_cabac_ctxt->ps_left_ctxt_mb_info;
2240 mb_info_ctxt_t *ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
2243 if (ps_left_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
2246 if (ps_top_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
2251 ps_cabac_ctxt,
2253 ps_cabac_ctxt->au1_cabac_ctxt_table
2259 memset(ps_cabac_ctxt->pu1_left_mv_ctxt_inc, 0, 16);
2262 ih264e_cabac_enc_cbp(cbp, ps_cabac_ctxt);
2267 ih264e_cabac_enc_mb_qp_delta(mb_qp_delta, ps_cabac_ctxt);
2282 ih264e_cabac_enc_mb_skip(1, ps_cabac_ctxt, MB_SKIP_FLAG_B_SLICE);
2287 memset(ps_cabac_ctxt->pu1_left_mv_ctxt_inc, 0, 16);
2309 ih264e_cabac_enc_mb_skip(0, ps_cabac_ctxt, MB_SKIP_FLAG_B_SLICE);
2314 ps_cabac_ctxt->ps_left_ctxt_mb_info;
2315 mb_info_ctxt_t *ps_top_ctxt = ps_cabac_ctxt->ps_top_ctxt_mb_info;
2322 if (ps_left_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
2325 if (ps_top_ctxt != ps_cabac_ctxt->ps_def_ctxt_mb_info)
2335 &(ps_cabac_ctxt->au1_cabac_ctxt_table[MB_TYPE_B_SLICE]),
2336 ps_cabac_ctxt);
2349 ih264e_cabac_enc_mvds_b16x16(ps_cabac_ctxt, pi2_mv_ptr,
2353 ih264e_cabac_enc_cbp(cbp, ps_cabac_ctxt);
2358 ih264e_cabac_enc_mb_qp_delta(mb_qp_delta, ps_cabac_ctxt);
2378 ps_cabac_ctxt->pu1_left_yuv_dc_csbp[0] &= 0x6;
2385 *(ps_cabac_ctxt->pu1_left_uv_ac_csbp) = 0;
2386 *(ps_cabac_ctxt->pu1_left_y_ac_csbp) = 0;
2387 *(ps_cabac_ctxt->pu1_left_yuv_dc_csbp) = 0;