diff options
author | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2014-07-15 00:20:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 14:08:20 +0200 |
commit | 453f8eaee213a1940c5d5dda7cb1bcd148e2c183 (patch) | |
tree | 81a50e2209a60e5d5e5cad9016a5fd20e5079fb6 /libavcodec/hevcdsp_template.c | |
parent | 5a41999d81459297183c4e27618e38f8ba719853 (diff) | |
download | ffmpeg-453f8eaee213a1940c5d5dda7cb1bcd148e2c183.tar.gz |
hevc/rext: add support for Range extension tools
SPS features/flags:
- transform_skip_rotation_enabled_flag
- transform_skip_context_enabled_flag
- implicit_rdpcm_enabled_flag
- explicit_rdpcm_enabled_flag
- intra_smoothing_disabled_flag
- persistent_rice_adaptation_enabled_flag
PPS features/flags:
- log2_max_transform_skip_block_size
- cross_component_prediction_enabled_flag
- chroma_qp_offset_list_enabled_flag
- diff_cu_chroma_qp_offset_depth
- chroma_qp_offset_list_len_minus1
- cb_qp_offset_list
- cr_qp_offset_list
- log2_sao_offset_scale_luma
- log2_sao_offset_scale_chroma
(cherry picked from commit 005294c5b939a23099871c6130c8a7cc331f73ee)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevcdsp_template.c')
-rw-r--r-- | libavcodec/hevcdsp_template.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c index cceba2453d..f0bb256b4b 100644 --- a/libavcodec/hevcdsp_template.c +++ b/libavcodec/hevcdsp_template.c @@ -110,6 +110,29 @@ static void FUNC(transform_add32x32)(uint8_t *_dst, int16_t *coeffs, } } + +static void FUNC(transform_rdpcm)(int16_t *_coeffs, int16_t log2_size, int mode) +{ + int16_t *coeffs = (int16_t *) _coeffs; + int x, y; + int size = 1 << log2_size; + + if (mode) { + coeffs += size; + for (y = 0; y < size - 1; y++) { + for (x = 0; x < size; x++) + coeffs[x] += coeffs[x - size]; + coeffs += size; + } + } else { + for (y = 0; y < size; y++) { + for (x = 1; x < size; x++) + coeffs[x] += coeffs[x - 1]; + coeffs += size; + } + } +} + static void FUNC(transform_skip)(int16_t *_coeffs, int16_t log2_size) { int shift = 15 - BIT_DEPTH - log2_size; |