Lines Matching defs:lc
768 HEVCLocalContext *lc = s->HEVClc;
777 if (lc->ctb_left_flag)
781 if (lc->ctb_up_flag)
841 HEVCLocalContext *lc = s->HEVClc;
846 lc->tu.res_scale_val = (1 << (log2_res_scale_abs_plus1 - 1)) *
849 lc->tu.res_scale_val = 0;
861 HEVCLocalContext *lc = s->HEVClc;
865 if (lc->cu.pred_mode == MODE_INTRA) {
872 if (lc->tt.cbf_luma ||
873 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0) ||
874 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0) ||
876 (SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0 + (1 << log2_trafo_size_c)) ||
877 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0 + (1 << log2_trafo_size_c))))) {
880 int cbf_luma = lc->tt.cbf_luma;
881 int cbf_chroma = SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0) ||
882 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0) ||
884 (SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0 + (1 << log2_trafo_size_c)) ||
885 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0 + (1 << log2_trafo_size_c))));
887 if (s->pps->cu_qp_delta_enabled_flag && !lc->tu.is_cu_qp_delta_coded) {
888 lc->tu.cu_qp_delta = ff_hevc_cu_qp_delta_abs(s);
889 if (lc->tu.cu_qp_delta != 0)
891 lc->tu.cu_qp_delta = -lc->tu.cu_qp_delta;
892 lc->tu.is_cu_qp_delta_coded = 1;
894 if (lc->tu.cu_qp_delta < -(26 + s->sps->qp_bd_offset / 2) ||
895 lc->tu.cu_qp_delta > (25 + s->sps->qp_bd_offset / 2)) {
899 lc->tu.cu_qp_delta,
909 !lc->cu.cu_transquant_bypass_flag && !lc->tu.is_cu_chroma_qp_offset_coded) {
918 lc->tu.cu_qp_offset_cb = s->pps->cb_qp_offset_list[cu_chroma_qp_offset_idx];
919 lc->tu.cu_qp_offset_cr = s->pps->cr_qp_offset_list[cu_chroma_qp_offset_idx];
921 lc->tu.cu_qp_offset_cb = 0;
922 lc->tu.cu_qp_offset_cr = 0;
924 lc->tu.is_cu_chroma_qp_offset_coded = 1;
927 if (lc->cu.pred_mode == MODE_INTRA && log2_trafo_size < 4) {
928 if (lc->tu.intra_pred_mode >= 6 &&
929 lc->tu.intra_pred_mode <= 14) {
931 } else if (lc->tu.intra_pred_mode >= 22 &&
932 lc->tu.intra_pred_mode <= 30) {
936 if (lc->tu.intra_pred_mode_c >= 6 &&
937 lc->tu.intra_pred_mode_c <= 14) {
939 } else if (lc->tu.intra_pred_mode_c >= 22 &&
940 lc->tu.intra_pred_mode_c <= 30) {
945 lc->tu.cross_pf = 0;
952 lc->tu.cross_pf = (s->pps->cross_component_prediction_enabled_flag && cbf_luma &&
953 (lc->cu.pred_mode == MODE_INTER ||
954 (lc->tu.chroma_mode_c == 4)));
956 if (lc->tu.cross_pf) {
960 if (lc->cu.pred_mode == MODE_INTRA) {
964 if (SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0 + (i << log2_trafo_size_c)))
968 if (lc->tu.cross_pf) {
972 int16_t *coeffs_y = lc->tu.coeffs[0];
973 int16_t *coeffs = lc->tu.coeffs[1];
979 coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3);
985 if (lc->tu.cross_pf) {
989 if (lc->cu.pred_mode == MODE_INTRA) {
993 if (SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0 + (i << log2_trafo_size_c)))
997 if (lc->tu.cross_pf) {
1001 int16_t *coeffs_y = lc->tu.coeffs[0];
1002 int16_t *coeffs = lc->tu.coeffs[1];
1008 coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3);
1017 if (lc->cu.pred_mode == MODE_INTRA) {
1022 if (SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], xBase, yBase + (i << log2_trafo_size_c)))
1027 if (lc->cu.pred_mode == MODE_INTRA) {
1032 if (SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], xBase, yBase + (i << log2_trafo_size_c)))
1037 } else if (lc->cu.pred_mode == MODE_INTRA) {
1089 HEVCLocalContext *lc = s->HEVClc;
1094 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0) =
1095 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth - 1], xBase, yBase);
1096 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0) =
1097 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth - 1], xBase, yBase);
1101 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1))) =
1102 SAMPLE_CBF2(lc->tt.cbf_cb[trafo_depth - 1], xBase_cb, yBase_cb + (1 << (log2_trafo_size)));
1103 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1))) =
1104 SAMPLE_CBF2(lc->tt.cbf_cr[trafo_depth - 1], xBase_cb, yBase_cb + (1 << (log2_trafo_size)));
1107 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0) =
1108 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0) = 0;
1110 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1))) =
1111 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1))) = 0;
1115 if (lc->cu.intra_split_flag) {
1117 lc->tu.intra_pred_mode = lc->pu.intra_pred_mode[blk_idx];
1119 lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[blk_idx];
1120 lc->tu.chroma_mode_c = lc->pu.chroma_mode_c[blk_idx];
1122 lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0];
1123 lc->tu.chroma_mode_c = lc->pu.chroma_mode_c[0];
1127 lc->tu.intra_pred_mode = lc->pu.intra_pred_mode[0];
1128 lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0];
1129 lc->tu.chroma_mode_c = lc->pu.chroma_mode_c[0];
1132 lc->tt.cbf_luma = 1;
1134 lc->tt.inter_split_flag = s->sps->max_transform_hierarchy_depth_inter == 0 &&
1135 lc->cu.pred_mode == MODE_INTER &&
1136 lc->cu.part_mode != PART_2Nx2N &&
1141 trafo_depth < lc->cu.max_trafo_depth &&
1142 !(lc->cu.intra_split_flag && trafo_depth == 0)) {
1146 (lc->cu.intra_split_flag && trafo_depth == 0) ||
1147 lc->tt.inter_split_flag;
1152 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth - 1], xBase, yBase)) {
1153 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0) =
1156 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1))) =
1162 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth - 1], xBase, yBase)) {
1163 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0) =
1166 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1))) =
1201 if (lc->cu.pred_mode == MODE_INTRA || trafo_depth != 0 ||
1202 SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0) ||
1203 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0) ||
1205 (SAMPLE_CBF(lc->tt.cbf_cb[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1))) ||
1206 SAMPLE_CBF(lc->tt.cbf_cr[trafo_depth], x0, y0 + (1 << (log2_trafo_size - 1)))))) {
1207 lc->tt.cbf_luma = ff_hevc_cbf_luma_decode(s, trafo_depth);
1216 if (lc->tt.cbf_luma) {
1228 lc->cu.cu_transquant_bypass_flag)
1238 HEVCLocalContext *lc = s->HEVClc;
1252 const uint8_t *pcm = skip_bytes(&lc->cc, (length + 7) >> 3);
1294 HEVCLocalContext *lc = s->HEVClc;
1316 s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src - offset,
1322 src = lc->edge_emu_buffer + buf_offset;
1355 HEVCLocalContext *lc = s->HEVClc;
1383 s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src0 - offset,
1389 src0 = lc->edge_emu_buffer + buf_offset;
1400 s->vdsp.emulated_edge_mc(lc->edge_emu_buffer2, src1 - offset,
1406 src1 = lc->edge_emu_buffer2 + buf_offset;
1447 HEVCLocalContext *lc = s->HEVClc;
1472 s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src0 - offset0,
1479 src0 = lc->edge_emu_buffer + buf_offset0;
1513 HEVCLocalContext *lc = s->HEVClc;
1552 s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src1 - offset1,
1559 src1 = lc->edge_emu_buffer + buf_offset1;
1571 s->vdsp.emulated_edge_mc(lc->edge_emu_buffer2, src2 - offset1,
1578 src2 = lc->edge_emu_buffer2 + buf_offset1;
1616 HEVCLocalContext *lc = s->HEVClc;
1655 lc->pu.merge_flag = ff_hevc_merge_flag_decode(s);
1656 if (lc->pu.merge_flag) {
1688 current_mv.mv[0].x += lc->pu.mvd.x;
1689 current_mv.mv[0].y += lc->pu.mvd.y;
1699 lc->pu.mvd.x = 0;
1700 lc->pu.mvd.y = 0;
1710 current_mv.mv[1].x += lc->pu.mvd.x;
1711 current_mv.mv[1].y += lc->pu.mvd.y;
1795 HEVCLocalContext *lc = s->HEVClc;
1803 int cand_up = (lc->ctb_up_flag || y0b) ?
1805 int cand_left = (lc->ctb_left_flag || x0b) ?
1842 intra_pred_mode = candidate[lc->pu.mpm_idx];
1851 intra_pred_mode = lc->pu.rem_intra_luma_pred_mode;
1892 HEVCLocalContext *lc = s->HEVClc;
1895 int split = lc->cu.part_mode == PART_NxN;
1908 lc->pu.mpm_idx = ff_hevc_mpm_idx_decode(s);
1910 lc->pu.rem_intra_luma_pred_mode = ff_hevc_rem_intra_luma_pred_mode_decode(s);
1912 lc->pu.intra_pred_mode[2 * i + j] =
1921 lc->pu.chroma_mode_c[2 * i + j] = chroma_mode = ff_hevc_intra_chroma_pred_mode_decode(s);
1923 if (lc->pu.intra_pred_mode[2 * i + j] == intra_chroma_table[chroma_mode])
1924 lc->pu.intra_pred_mode_c[2 * i + j] = 34;
1926 lc->pu.intra_pred_mode_c[2 * i + j] = intra_chroma_table[chroma_mode];
1928 lc->pu.intra_pred_mode_c[2 * i + j] = lc->pu.intra_pred_mode[2 * i + j];
1934 lc->pu.chroma_mode_c[0] = chroma_mode = ff_hevc_intra_chroma_pred_mode_decode(s);
1936 if (lc->pu.intra_pred_mode[0] == intra_chroma_table[chroma_mode])
1941 mode_idx = lc->pu.intra_pred_mode[0];
1943 lc->pu.intra_pred_mode_c[0] = tab_mode_idx[mode_idx];
1947 if (lc->pu.intra_pred_mode[0] == intra_chroma_table[chroma_mode])
1948 lc->pu.intra_pred_mode_c[0] = 34;
1950 lc->pu.intra_pred_mode_c[0] = intra_chroma_table[chroma_mode];
1952 lc->pu.intra_pred_mode_c[0] = lc->pu.intra_pred_mode[0];
1961 HEVCLocalContext *lc = s->HEVClc;
1974 if (lc->cu.pred_mode == MODE_INTRA)
1983 HEVCLocalContext *lc = s->HEVClc;
1993 lc->cu.x = x0;
1994 lc->cu.y = y0;
1995 lc->cu.rqt_root_cbf = 1;
1996 lc->cu.pred_mode = MODE_INTRA;
1997 lc->cu.part_mode = PART_2Nx2N;
1998 lc->cu.intra_split_flag = 0;
1999 lc->cu.pcm_flag = 0;
2003 lc->pu.intra_pred_mode[x] = 1;
2005 lc->cu.cu_transquant_bypass_flag = ff_hevc_cu_transquant_bypass_flag_decode(s);
2006 if (lc->cu.cu_transquant_bypass_flag)
2009 lc->cu.cu_transquant_bypass_flag = 0;
2019 lc->cu.pred_mode = skip_flag ? MODE_SKIP : MODE_INTER;
2030 lc->cu.pred_mode = ff_hevc_pred_mode_decode(s);
2031 if (lc->cu.pred_mode != MODE_INTRA ||
2033 lc->cu.part_mode = ff_hevc_part_mode_decode(s, log2_cb_size);
2034 lc->cu.intra_split_flag = lc->cu.part_mode == PART_NxN &&
2035 lc->cu.pred_mode == MODE_INTRA;
2038 if (lc->cu.pred_mode == MODE_INTRA) {
2039 if (lc->cu.part_mode == PART_2Nx2N && s->sps->pcm_enabled_flag &&
2042 lc->cu.pcm_flag = ff_hevc_pcm_flag_decode(s);
2044 if (lc->cu.pcm_flag) {
2057 switch (lc->cu.part_mode) {
2094 if (!lc->cu.pcm_flag) {
2095 if (lc->cu.pred_mode != MODE_INTRA &&
2096 !(lc->cu.part_mode == PART_2Nx2N && lc->pu.merge_flag)) {
2097 lc->cu.rqt_root_cbf = ff_hevc_no_residual_syntax_flag_decode(s);
2099 if (lc->cu.rqt_root_cbf) {
2100 lc->cu.max_trafo_depth = lc->cu.pred_mode == MODE_INTRA ?
2101 s->sps->max_transform_hierarchy_depth_intra + lc->cu.intra_split_flag :
2115 if (s->pps->cu_qp_delta_enabled_flag && lc->tu.is_cu_qp_delta_coded == 0)
2120 memset(&s->qp_y_tab[x], lc->qp_y, length);
2126 lc->qPy_pred = lc->qp_y;
2129 set_ct_depth(s, x0, y0, log2_cb_size, lc->ct.depth);
2137 HEVCLocalContext *lc = s->HEVClc;
2143 lc->ct.depth = cb_depth;
2153 lc->tu.is_cu_qp_delta_coded = 0;
2154 lc->tu.cu_qp_delta = 0;
2159 lc->tu.is_cu_chroma_qp_offset_coded = 0;
2192 lc->qPy_pred = lc->qp_y;
2222 HEVCLocalContext *lc = s->HEVClc;
2234 lc->first_qp_group = 1;
2235 lc->end_of_tiles_x = s->sps->width;
2239 lc->end_of_tiles_x = x_ctb + (s->pps->column_width[idxX] << s->sps->log2_ctb_size);
2240 lc->first_qp_group = 1;
2243 lc->end_of_tiles_x = s->sps->width;
2246 lc->end_of_tiles_y = FFMIN(y_ctb + ctb_size, s->sps->height);
2263 lc->slice_or_tiles_left_boundary = slice_left_boundary + (tile_left_boundary << 1);
2264 lc->slice_or_tiles_up_boundary = slice_up_boundary + (tile_up_boundary << 1);
2265 lc->ctb_left_flag = ((x_ctb > 0) && (ctb_addr_in_slice > 0) && !tile_left_boundary);
2266 lc->ctb_up_flag = ((y_ctb > 0) && (ctb_addr_in_slice >= s->sps->ctb_width) && !tile_up_boundary);
2267 lc->ctb_up_right_flag = ((y_ctb > 0) && (ctb_addr_in_slice+1 >= s->sps->ctb_width) && (s->pps->tile_id[ctb_addr_ts] == s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs+1 - s->sps->ctb_width]]));
2268 lc->ctb_up_left_flag = ((x_ctb > 0) && (y_ctb > 0) && (ctb_addr_in_slice-1 >= s->sps->ctb_width) && (s->pps->tile_id[ctb_addr_ts] == s->pps->tile_id[s->pps->ctb_addr_rs_to_ts[ctb_addr_rs-1 - s->sps->ctb_width]]));
2341 HEVCLocalContext *lc;
2352 lc = s->HEVClc;
2355 ret = init_get_bits8(&lc->gb, s->data + s->sh.offset[ctb_row - 1], s->sh.size[ctb_row - 1]);
2359 ff_init_cabac_decoder(&lc->cc, s->data + s->sh.offset[(ctb_row)-1], s->sh.size[ctb_row - 1]);
2415 HEVCLocalContext *lc = s->HEVClc;
2435 offset = (lc->gb.index >> 3);
2567 HEVCLocalContext *lc = s->HEVClc;
2583 lc->end_of_tiles_x = s->pps->column_width[0] << s->sps->log2_ctb_size;
2623 HEVCLocalContext *lc = s->HEVClc;
2624 GetBitContext *gb = &lc->gb;
3134 HEVCLocalContext *lc = s->HEVClc;
3175 lc = s->HEVClcList[i];
3176 if (lc) {