Lines Matching refs:c_idx
772 int c_idx, i;
786 for (c_idx = 0; c_idx < 3; c_idx++) {
787 int log2_sao_offset_scale = c_idx == 0 ? s->pps->log2_sao_offset_scale_luma :
790 if (!s->sh.slice_sample_adaptive_offset_flag[c_idx]) {
791 sao->type_idx[c_idx] = SAO_NOT_APPLIED;
795 if (c_idx == 2) {
799 SET_SAO(type_idx[c_idx], ff_hevc_sao_type_idx_decode(s));
802 if (sao->type_idx[c_idx] == SAO_NOT_APPLIED)
806 SET_SAO(offset_abs[c_idx][i], ff_hevc_sao_offset_abs_decode(s));
808 if (sao->type_idx[c_idx] == SAO_BAND) {
810 if (sao->offset_abs[c_idx][i]) {
811 SET_SAO(offset_sign[c_idx][i],
814 sao->offset_sign[c_idx][i] = 0;
817 SET_SAO(band_position[c_idx], ff_hevc_sao_band_position_decode(s));
818 } else if (c_idx != 2) {
819 SET_SAO(eo_class[c_idx], ff_hevc_sao_eo_class_decode(s));
823 sao->offset_val[c_idx][0] = 0;
825 sao->offset_val[c_idx][i + 1] = sao->offset_abs[c_idx][i];
826 if (sao->type_idx[c_idx] == SAO_EDGE) {
828 sao->offset_val[c_idx][i + 1] = -sao->offset_val[c_idx][i + 1];
829 } else if (sao->offset_sign[c_idx][i]) {
830 sao->offset_val[c_idx][i + 1] = -sao->offset_val[c_idx][i + 1];
832 sao->offset_val[c_idx][i + 1] <<= log2_sao_offset_scale;
1613 #define POS(c_idx, x, y) \
1614 &s->frame->data[c_idx][((y) >> s->sps->vshift[c_idx]) * s->frame->linesize[c_idx] + \
1615 (((x) >> s->sps->hshift[c_idx]) << s->sps->pixel_shift)]