Home
last modified time | relevance | path

Searched refs:av_clip (Results 1 – 25 of 216) sorted by relevance

123456789

/third_party/ffmpeg/libavfilter/
Dvf_deband.c159 … const int ref0 = src_ptr[av_clip(y + y_pos, 0, h) * src_linesize + av_clip(x + x_pos, 0, w)]; in deband_8_c()
160 … const int ref1 = src_ptr[av_clip(y + -y_pos, 0, h) * src_linesize + av_clip(x + x_pos, 0, w)]; in deband_8_c()
161 … const int ref2 = src_ptr[av_clip(y + -y_pos, 0, h) * src_linesize + av_clip(x + -x_pos, 0, w)]; in deband_8_c()
162 … const int ref3 = src_ptr[av_clip(y + y_pos, 0, h) * src_linesize + av_clip(x + -x_pos, 0, w)]; in deband_8_c()
207 … const int ref0 = src_ptr[av_clip(y + y_pos, 0, h) * src_linesize + av_clip(x + x_pos, 0, w)]; in deband_8_coupling_c()
208 … const int ref1 = src_ptr[av_clip(y + -y_pos, 0, h) * src_linesize + av_clip(x + x_pos, 0, w)]; in deband_8_coupling_c()
209 … const int ref2 = src_ptr[av_clip(y + -y_pos, 0, h) * src_linesize + av_clip(x + -x_pos, 0, w)]; in deband_8_coupling_c()
210 … const int ref3 = src_ptr[av_clip(y + y_pos, 0, h) * src_linesize + av_clip(x + -x_pos, 0, w)]; in deband_8_coupling_c()
272 … const int ref0 = src_ptr[av_clip(y + y_pos, 0, h) * src_linesize + av_clip(x + x_pos, 0, w)]; in deband_16_coupling_c()
273 … const int ref1 = src_ptr[av_clip(y + -y_pos, 0, h) * src_linesize + av_clip(x + x_pos, 0, w)]; in deband_16_coupling_c()
[all …]
Dvf_removegrain.c81 return av_clip(c, mi, ma); in mode01()
97 return av_clip(c, a[2 - 1 ], a[7 - 1]); in mode02()
106 return av_clip(c, a[3 - 1 ], a[6 - 1]); in mode03()
115 return av_clip(c, a[4 - 1 ], a[5 - 1]); in mode04()
122 const int c1 = FFABS(c - av_clip(c, mi1, ma1)); in mode05()
123 const int c2 = FFABS(c - av_clip(c, mi2, ma2)); in mode05()
124 const int c3 = FFABS(c - av_clip(c, mi3, ma3)); in mode05()
125 const int c4 = FFABS(c - av_clip(c, mi4, ma4)); in mode05()
131 return av_clip(c, mi4, ma4); in mode05()
133 return av_clip(c, mi2, ma2); in mode05()
[all …]
Dvf_deblock.c122 dst[x - 2 * dst_linesize] = av_clip(a, 0, max); \
123 dst[x - 1 * dst_linesize] = av_clip(b, 0, max); \
124 dst[x + 0 * dst_linesize] = av_clip(c, 0, max); \
125 dst[x + 1 * dst_linesize] = av_clip(d, 0, max); \
161 dst[-2] = av_clip(a, 0, max); \
162 dst[-1] = av_clip(b, 0, max); \
163 dst[+0] = av_clip(c, 0, max); \
164 dst[+1] = av_clip(d, 0, max); \
207 dst[x - 3 * dst_linesize] = av_clip(a, 0, max); \
208 dst[x - 2 * dst_linesize] = av_clip(b, 0, max); \
[all …]
Dvf_estdif.c160 return (prev[av_clip(x + k, 0, end)] + \
161 next[av_clip(x - k, 0, end)] + 1) >> 1; \
176 return (prev[av_clip(x + k, 0, end)] + \
177 next[av_clip(x - k, 0, end)] + 1) >> 1; \
193 9 * (prev[av_clip(x + k, 0, end)] + \
194 next[av_clip(x - k, 0, end)]) - \
195 1 * (prev2[av_clip(x + k*3, 0, end)] + \
196 next2[av_clip(x - k*3, 0, end)]) + 8) >> 4, \
213 20 * (prev[av_clip(x + k, 0, end)] + \
214 next[av_clip(x - k, 0, end)]) - \
[all …]
Dvf_codecview.c130 sx = av_clip(sx, 0, w - 1); in draw_line()
131 sy = av_clip(sy, 0, h - 1); in draw_line()
132 ex = av_clip(ex, 0, w - 1); in draw_line()
133 ey = av_clip(ey, 0, h - 1); in draw_line()
188 sx = av_clip(sx, -100, w + 100); in draw_arrow()
189 sy = av_clip(sy, -100, h + 100); in draw_arrow()
190 ex = av_clip(ex, -100, w + 100); in draw_arrow()
191 ey = av_clip(ey, -100, h + 100); in draw_arrow()
Dvf_chromashift.c116 const int duy = av_clip(y - cbv, 0, h-1) * sulinesize; \
117 const int dvy = av_clip(y - crv, 0, h-1) * svlinesize; \
120 du[x] = su[av_clip(x - cbh, 0, w - 1) + duy]; \
121 dv[x] = sv[av_clip(x - crh, 0, w - 1) + dvy]; \
225 const int ry = av_clip(y - rv, 0, h-1) * srlinesize; \
226 const int gy = av_clip(y - gv, 0, h-1) * sglinesize; \
227 const int by = av_clip(y - bv, 0, h-1) * sblinesize; \
231 dr[x] = sr[av_clip(x - rh, 0, w - 1) + ry]; \
232 dg[x] = sg[av_clip(x - gh, 0, w - 1) + gy]; \
233 db[x] = sb[av_clip(x - bh, 0, w - 1) + by]; \
[all …]
Dvf_minterpolate.c269 x = av_clip(x, me_ctx->x_min, me_ctx->x_max); in get_sbad()
270 y = av_clip(y, me_ctx->y_min, me_ctx->y_max); in get_sbad()
271 …mv_x = av_clip(x_mv - x, -FFMIN(x - me_ctx->x_min, me_ctx->x_max - x), FFMIN(x - me_ctx->x_min, me… in get_sbad()
272 …mv_y = av_clip(y_mv - y, -FFMIN(y - me_ctx->y_min, me_ctx->y_max - y), FFMIN(y - me_ctx->y_min, me… in get_sbad()
298 x = av_clip(x, x_min, x_max); in get_sbad_ob()
299 y = av_clip(y, y_min, y_max); in get_sbad_ob()
300 mv_x = av_clip(x_mv - x, -FFMIN(x - x_min, x_max - x), FFMIN(x - x_min, x_max - x)); in get_sbad_ob()
301 mv_y = av_clip(y_mv - y, -FFMIN(y - y_min, y_max - y), FFMIN(y - y_min, y_max - y)); in get_sbad_ob()
324 x = av_clip(x, x_min, x_max); in get_sad_ob()
325 y = av_clip(y, y_min, y_max); in get_sad_ob()
[all …]
Dvf_v360.c771 return av_clip(y, 0, h - 1); in reflecty()
1493 new_ui = av_clip(lrintf(0.5f * new_ewi * (uf + 1.f)), 0, new_ewi - 1); in xyz_to_cube3x2()
1494 new_vi = av_clip(lrintf(0.5f * new_ehi * (vf + 1.f)), 0, new_ehi - 1); in xyz_to_cube3x2()
1639 new_ui = av_clip(lrintf(0.5f * ewi * (uf + 1.f)), 0, ewi - 1); in xyz_to_cube1x6()
1640 new_vi = av_clip(lrintf(0.5f * new_ehi * (vf + 1.f)), 0, new_ehi - 1); in xyz_to_cube1x6()
1719 new_ui = av_clip(lrintf(0.5f * new_ewi * (uf + 1.f)), 0, new_ewi - 1); in xyz_to_cube6x1()
1720 new_vi = av_clip(lrintf(0.5f * ehi * (vf + 1.f)), 0, ehi - 1); in xyz_to_cube6x1()
1887 us[i][j] = visible ? av_clip(ui + j - 1, 0, width - 1) : 0; in xyz_to_stereographic()
1888 vs[i][j] = visible ? av_clip(vi + i - 1, 0, height - 1) : 0; in xyz_to_stereographic()
1993 us[i][j] = visible ? av_clip(ui + j - 1, 0, width - 1) : 0; in xyz_to_equisolid()
[all …]
Dvf_swaprect.c148 x1[0] = av_clip(x1[0], 0, inlink->w - 1); in filter_frame()
149 y1[0] = av_clip(y1[0], 0, inlink->w - 1); in filter_frame()
151 x2[0] = av_clip(x2[0], 0, inlink->w - 1); in filter_frame()
152 y2[0] = av_clip(y2[0], 0, inlink->w - 1); in filter_frame()
/third_party/ffmpeg/libavcodec/
Daudiodsp.c94 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
95 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
96 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
97 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
98 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
99 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
100 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
101 *dst++ = av_clip(*src++, min, max); in vector_clip_int32_c()
Dg722.c121 band->pole_mem[1] = av_clip((sg[0] * av_clip(band->pole_mem[0], -8191, 8191) >> 5) + in do_adaptive_prediction()
125 band->pole_mem[0] = av_clip(-192 * sg[0] + (band->pole_mem[0] * 255 >> 8), -limit, limit); in do_adaptive_prediction()
149 band->log_factor = av_clip((band->log_factor * 127 >> 7) + in ff_g722_update_low_predictor()
160 band->log_factor = av_clip((band->log_factor * 127 >> 7) + in ff_g722_update_high_predictor()
Ddirac_dwt_template.c164 v[i] = b[av_clip(x-3+i, 0, w2-1)]; in RENAME()
170 v[i] = tmp[av_clip(x-4+i, 0, w2-1)]; in RENAME()
349 b[6] = d->buffer + av_clip(y+5, 0, height-2)*stride; in RENAME()
350 b[7] = d->buffer + av_clip(y+6, 1, height-1)*stride; in RENAME()
395 b[8] = d->buffer + av_clip(y+7, 0, height-2)*stride; in RENAME()
396 b[9] = d->buffer + av_clip(y+8, 1, height-1)*stride; in RENAME()
435 b[i] = d->buffer + av_clip((y-7 + 2*i), 0, height-2)*stride; in RENAME()
441 b[i] = d->buffer + av_clip((y-7 + 2*i), 1, height-1)*stride; in RENAME()
497 cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; in RENAME()
498 cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; in RENAME()
[all …]
Dvc1_mc.c259 src_x = av_clip( src_x, -16, s->mb_width * 16); in ff_vc1_mc_1mv()
260 src_y = av_clip( src_y, -16, s->mb_height * 16); in ff_vc1_mc_1mv()
261 uvsrc_x = av_clip(uvsrc_x, -8, s->mb_width * 8); in ff_vc1_mc_1mv()
262 uvsrc_y = av_clip(uvsrc_y, -8, s->mb_height * 8); in ff_vc1_mc_1mv()
264 src_x = av_clip( src_x, -17, s->avctx->coded_width); in ff_vc1_mc_1mv()
265 uvsrc_x = av_clip(uvsrc_x, -8, s->avctx->coded_width >> 1); in ff_vc1_mc_1mv()
267 src_y = av_clip(src_y, -18 + (src_y & 1), s->avctx->coded_height + (src_y & 1)); in ff_vc1_mc_1mv()
268 … uvsrc_y = av_clip(uvsrc_y, -8 + (uvsrc_y & 1), (s->avctx->coded_height >> 1) + (uvsrc_y & 1)); in ff_vc1_mc_1mv()
270 src_y = av_clip(src_y, -18, s->avctx->coded_height + 1); in ff_vc1_mc_1mv()
271 uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1); in ff_vc1_mc_1mv()
[all …]
Dmpegvideodsp.c82 index = src_x + av_clip(src_y, 0, height) * stride; in ff_gmc_c()
90 index = av_clip(src_x, 0, width) + src_y * stride; in ff_gmc_c()
96 index = av_clip(src_x, 0, width) + in ff_gmc_c()
97 av_clip(src_y, 0, height) * stride; in ff_gmc_c()
Dacelp_pitch_delay.c121 int search_range_min = av_clip(prev_lag_int - 5, PITCH_DELAY_MIN, in ff_decode_pitch_lag()
140 pitch_index += 3 * av_clip(prev_lag_int - 10, PITCH_DELAY_MIN, in ff_decode_pitch_lag()
143 pitch_index += 3 * av_clip(prev_lag_int - 5, PITCH_DELAY_MIN, in ff_decode_pitch_lag()
Dansi.c211 …s->y = s->nb_args > 0 ? av_clip((s->args[0] - 1)*s->font_height, 0, avctx->height - s->font_height… in execute_code()
212 …s->x = s->nb_args > 1 ? av_clip((s->args[1] - 1)*FONT_WIDTH, 0, avctx->width - FONT_WIDTH) : … in execute_code()
254 s->x = av_clip(s->x, 0, width - FONT_WIDTH); in execute_code()
255 s->y = av_clip(s->y, 0, height - s->font_height); in execute_code()
344 s->x = av_clip(s->sx, 0, avctx->width - FONT_WIDTH); in execute_code()
345 s->y = av_clip(s->sy, 0, avctx->height - s->font_height); in execute_code()
351 s->x = av_clip(s->x, 0, avctx->width - FONT_WIDTH); in execute_code()
352 s->y = av_clip(s->y, 0, avctx->height - s->font_height); in execute_code()
Dbytestream.h218 offset = av_clip(offset, -(g->buffer - g->buffer_start), in bytestream2_seek()
223 offset = av_clip(offset, -(g->buffer_end - g->buffer_start), 0); in bytestream2_seek()
227 offset = av_clip(offset, 0, g->buffer_end - g->buffer_start); in bytestream2_seek()
245 offset = av_clip(offset, -(p->buffer - p->buffer_start), in bytestream2_seek_p()
252 offset = av_clip(offset, -(p->buffer_end - p->buffer_start), 0); in bytestream2_seek_p()
258 offset = av_clip(offset, 0, p->buffer_end - p->buffer_start); in bytestream2_seek_p()
Daaccoder.c207 sce->sf_idx[w*16+g] = av_clip(roundf(log2f(sce->is_ener[w*16+g])*2), -155, 100); in set_special_band_scalefactors()
210 sce->sf_idx[w*16+g] = av_clip(3+ceilf(log2f(sce->pns_ener[w*16+g])*2), -100, 155); in set_special_band_scalefactors()
227 …sce->sf_idx[w*16+g] = prevscaler_i = av_clip(sce->sf_idx[w*16+g], prevscaler_i - SCALE_MAX_DIFF, p… in set_special_band_scalefactors()
229 …sce->sf_idx[w*16+g] = prevscaler_n = av_clip(sce->sf_idx[w*16+g], prevscaler_n - SCALE_MAX_DIFF, p… in set_special_band_scalefactors()
266 q0 = av_clip(coef2minsf(q0f), 0, SCALE_MAX_POS-1); in search_for_quantizers_anmr()
268 q1 = av_clip(coef2maxsf(q1f), 1, SCALE_MAX_POS); in search_for_quantizers_anmr()
287 q1 = av_clip(q0+1, 1, SCALE_MAX_POS); in search_for_quantizers_anmr()
288 q0 = av_clip(q1-1, 0, SCALE_MAX_POS - 1); in search_for_quantizers_anmr()
336 minscale = av_clip(minscale - q0, 0, TRELLIS_STATES - 1); in search_for_quantizers_anmr()
337 maxscale = av_clip(maxscale - q0, 0, TRELLIS_STATES); in search_for_quantizers_anmr()
[all …]
Dwmv2.c118 src_x = av_clip(src_x, -16, s->width); in ff_mspel_motion()
119 src_y = av_clip(src_y, -16, s->height); in ff_mspel_motion()
158 src_x = av_clip(src_x, -8, s->width >> 1); in ff_mspel_motion()
161 src_y = av_clip(src_y, -8, s->height >> 1); in ff_mspel_motion()
Dhevc_sei.c369 s->seconds_value[i] = av_clip(get_bits(gb, 6), 0, 59); in decode_nal_sei_timecode()
370 s->minutes_value[i] = av_clip(get_bits(gb, 6), 0, 59); in decode_nal_sei_timecode()
371 s->hours_value[i] = av_clip(get_bits(gb, 5), 0, 23); in decode_nal_sei_timecode()
375 s->seconds_value[i] = av_clip(get_bits(gb, 6), 0, 59); in decode_nal_sei_timecode()
378 s->minutes_value[i] = av_clip(get_bits(gb, 6), 0, 59); in decode_nal_sei_timecode()
381 s->hours_value[i] = av_clip(get_bits(gb, 5), 0, 23); in decode_nal_sei_timecode()
Daptx.c416 invert_quantize->factor_select = av_clip(factor_select, 0, tables->factor_max); in aptx_invert_quantization()
481 sw1 = (av_clip(sw1, -range, range) & ~0xF) * 16; in aptx_process_subband()
485 prediction->s_weight[0] = av_clip(rshift32(weight[0], 8), -range, range); in aptx_process_subband()
489 prediction->s_weight[1] = av_clip(rshift32(weight[1], 8), -range, range); in aptx_process_subband()
Dproresdsp.c34 #define CLIP_10(x) (av_clip((x), CLIP_MIN, CLIP_MAX_10))
35 #define CLIP_12(x) (av_clip((x), CLIP_MIN, CLIP_MAX_12))
Djpeglsenc.c192 Ra = av_clip(pred + err * state->twonear, 0, state->maxval); in ls_encode_line()
194 Ra = av_clip(pred - err * state->twonear, 0, state->maxval); in ls_encode_line()
220 pred = av_clip(pred - state->C[context], 0, state->maxval); in ls_encode_line()
224 pred = av_clip(pred + state->C[context], 0, state->maxval); in ls_encode_line()
234 Ra = av_clip(pred + err * state->twonear, 0, state->maxval); in ls_encode_line()
236 Ra = av_clip(pred - err * state->twonear, 0, state->maxval); in ls_encode_line()
/third_party/ffmpeg/libswscale/
Dalphablend.c71 d[x] = av_clip((u + (u >> shift)) >> shift, 0, max); in ff_sws_alphablendaway()
81 d[x] = av_clip((u + (u >> shift)) >> shift, 0, max); in ff_sws_alphablendaway()
107 d[x] = av_clip((u + (u >> shift)) >> shift, 0, max); in ff_sws_alphablendaway()
113 d[x] = av_clip((u + (u >> shift)) >> shift, 0, max); in ff_sws_alphablendaway()
142 d[plane_count*x + plane] = av_clip((u + (u >> shift)) >> shift, 0, max); in ff_sws_alphablendaway()
151 d[plane_count*x + plane] = av_clip((u + (u >> shift)) >> shift, 0, max); in ff_sws_alphablendaway()
/third_party/ffmpeg/tests/ref/fate/
Dsource23 Use of av_clip() where av_clip_uintp2() could be used:
24 Use of av_clip() where av_clip_intp2() could be used:

123456789