aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_cabac.c
diff options
context:
space:
mode:
authorplepere <pierre-edouard.lepere@insa-rennes.fr>2014-06-13 13:29:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-17 13:23:36 +0200
commit92cccb7bcd79845020ed8abebf35170c182443b2 (patch)
treeae617971130a38912f7f8608f9406c39a84723db /libavcodec/hevc_cabac.c
parentfa0d0fb42ecda5d9676c744195fd9ef0454c259d (diff)
downloadffmpeg-92cccb7bcd79845020ed8abebf35170c182443b2.tar.gz
avcodec/hevc: new idct + asm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_cabac.c')
-rw-r--r--libavcodec/hevc_cabac.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c
index 288f88576c..b23b89c393 100644
--- a/libavcodec/hevc_cabac.c
+++ b/libavcodec/hevc_cabac.c
@@ -1388,8 +1388,21 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0,
s->hevcdsp.transform_skip(dst, coeffs, stride);
else if (lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2)
s->hevcdsp.transform_4x4_luma_add(dst, coeffs, stride);
- else
- s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride);
+ else {
+ int max_xy = FFMAX(last_significant_coeff_x, last_significant_coeff_y);
+ if (max_xy == 0)
+ s->hevcdsp.transform_dc_add[log2_trafo_size-2](dst, coeffs, stride);
+ else {
+ int col_limit = last_significant_coeff_x + last_significant_coeff_y + 4;
+ if (max_xy < 4)
+ col_limit = FFMIN(4, col_limit);
+ else if (max_xy < 8)
+ col_limit = FFMIN(8, col_limit);
+ else if (max_xy < 12)
+ col_limit = FFMIN(24, col_limit);
+ s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride, col_limit);
+ }
+ }
}
}