aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2015-02-09 10:44:24 +0100
committerAnton Khirnov <anton@khirnov.net>2015-02-13 08:37:13 +0100
commiteea769df322fac2601a96db195fa7dc8d12a8fbc (patch)
treee3f5c0effb48870aa1cd9a6dace8bafbc17c08dd /libavcodec/hevc.c
parentfaa8ffda2c513573733624784f0a7d0a4959d33e (diff)
downloadffmpeg-eea769df322fac2601a96db195fa7dc8d12a8fbc.tar.gz
hevc: Use generic av_clip function, not C implementation
hevc seems to be the only place where the C implementation of the av_clip function is explicitly selected, precluding platform-specific optimizations Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 0511be92c9..c275e43f3b 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -251,10 +251,10 @@ static void pred_weight_table(HEVCContext *s, GetBitContext *gb)
uint8_t luma_weight_l1_flag[16];
uint8_t chroma_weight_l1_flag[16];
- s->sh.luma_log2_weight_denom = av_clip_c(get_ue_golomb_long(gb), 0, 7);
+ s->sh.luma_log2_weight_denom = av_clip(get_ue_golomb_long(gb), 0, 7);
if (s->sps->chroma_format_idc != 0) {
int delta = get_se_golomb(gb);
- s->sh.chroma_log2_weight_denom = av_clip_c(s->sh.luma_log2_weight_denom + delta, 0, 7);
+ s->sh.chroma_log2_weight_denom = av_clip(s->sh.luma_log2_weight_denom + delta, 0, 7);
}
for (i = 0; i < s->sh.nb_refs[L0]; i++) {
@@ -282,7 +282,7 @@ static void pred_weight_table(HEVCContext *s, GetBitContext *gb)
int delta_chroma_weight_l0 = get_se_golomb(gb);
int delta_chroma_offset_l0 = get_se_golomb(gb);
s->sh.chroma_weight_l0[i][j] = (1 << s->sh.chroma_log2_weight_denom) + delta_chroma_weight_l0;
- s->sh.chroma_offset_l0[i][j] = av_clip_c((delta_chroma_offset_l0 - ((128 * s->sh.chroma_weight_l0[i][j])
+ s->sh.chroma_offset_l0[i][j] = av_clip((delta_chroma_offset_l0 - ((128 * s->sh.chroma_weight_l0[i][j])
>> s->sh.chroma_log2_weight_denom) + 128), -128, 127);
}
} else {
@@ -318,7 +318,7 @@ static void pred_weight_table(HEVCContext *s, GetBitContext *gb)
int delta_chroma_weight_l1 = get_se_golomb(gb);
int delta_chroma_offset_l1 = get_se_golomb(gb);
s->sh.chroma_weight_l1[i][j] = (1 << s->sh.chroma_log2_weight_denom) + delta_chroma_weight_l1;
- s->sh.chroma_offset_l1[i][j] = av_clip_c((delta_chroma_offset_l1 - ((128 * s->sh.chroma_weight_l1[i][j])
+ s->sh.chroma_offset_l1[i][j] = av_clip((delta_chroma_offset_l1 - ((128 * s->sh.chroma_weight_l1[i][j])
>> s->sh.chroma_log2_weight_denom) + 128), -128, 127);
}
} else {
@@ -964,7 +964,7 @@ static void hls_residual_coding(HEVCContext *s, int x0, int y0,
else
offset = s->pps->cr_qp_offset + s->sh.slice_cr_qp_offset;
- qp_i = av_clip_c(qp_y + offset, -s->sps->qp_bd_offset, 57);
+ qp_i = av_clip(qp_y + offset, -s->sps->qp_bd_offset, 57);
if (qp_i < 30)
qp = qp_i;
else if (qp_i > 43)