diff options
author | Mickaël Raulet <mraulet@insa-rennes.fr> | 2016-07-04 15:37:52 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-07-18 15:27:13 +0200 |
commit | a92fd8a06256e71a0be87b03751ec3c2a4a8aa21 (patch) | |
tree | 107afc227b94776a8b834fa21acd169bdf2d6435 /libavcodec/hevc.c | |
parent | 4f247de3b797cdc9d243d26534412f81c306e5b5 (diff) | |
download | ffmpeg-a92fd8a06256e71a0be87b03751ec3c2a4a8aa21.tar.gz |
hevc: Add DC IDCT
Integrated to Libav by Josh de Kock <josh@itanimul.li>.
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index d5d3f59859..d8c707b3c6 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -1214,8 +1214,13 @@ static void hls_residual_coding(HEVCContext *s, int x0, int y0, else if (lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2) s->hevcdsp.transform_4x4_luma(coeffs); - else - s->hevcdsp.idct[log2_trafo_size - 2](coeffs); + else { + int max_xy = FFMAX(last_significant_coeff_x, last_significant_coeff_y); + if (max_xy == 0) + s->hevcdsp.idct_dc[log2_trafo_size - 2](coeffs); + else + s->hevcdsp.idct[log2_trafo_size - 2](coeffs); + } } s->hevcdsp.add_residual[log2_trafo_size - 2](dst, coeffs, stride); } |