Revision adcec46a

View differences:

libswscale/swscale.c
316 316
		for(j=0; j<lumFilterSize; j++)
317 317
			val += lumSrc[j][i] * lumFilter[j];
318 318

  
319
		dest[i]= clip_uint8(val>>19);
319
		dest[i]= av_clip_uint8(val>>19);
320 320
	}
321 321

  
322 322
	if(uDest != NULL)
......
331 331
				v += chrSrc[j][i + 2048] * chrFilter[j];
332 332
			}
333 333

  
334
			uDest[i]= clip_uint8(u>>19);
335
			vDest[i]= clip_uint8(v>>19);
334
			uDest[i]= av_clip_uint8(u>>19);
335
			vDest[i]= av_clip_uint8(v>>19);
336 336
		}
337 337
}
338 338

  
......
349 349
		for(j=0; j<lumFilterSize; j++)
350 350
			val += lumSrc[j][i] * lumFilter[j];
351 351

  
352
		dest[i]= clip_uint8(val>>19);
352
		dest[i]= av_clip_uint8(val>>19);
353 353
	}
354 354

  
355 355
	if(uDest == NULL)
......
367 367
				v += chrSrc[j][i + 2048] * chrFilter[j];
368 368
			}
369 369

  
370
			uDest[2*i]= clip_uint8(u>>19);
371
			uDest[2*i+1]= clip_uint8(v>>19);
370
			uDest[2*i]= av_clip_uint8(u>>19);
371
			uDest[2*i+1]= av_clip_uint8(v>>19);
372 372
		}
373 373
	else
374 374
		for(i=0; i<chrDstW; i++)
......
382 382
				v += chrSrc[j][i + 2048] * chrFilter[j];
383 383
			}
384 384

  
385
			uDest[2*i]= clip_uint8(v>>19);
386
			uDest[2*i+1]= clip_uint8(u>>19);
385
			uDest[2*i]= av_clip_uint8(v>>19);
386
			uDest[2*i+1]= av_clip_uint8(u>>19);
387 387
		}
388 388
}
389 389

  
......
1465 1465
    // generating tables:
1466 1466
    int i;
1467 1467
    for(i=0; i<768; i++){
1468
	int c= clip_uint8(i-256);
1468
	int c= av_clip_uint8(i-256);
1469 1469
	clip_table[i]=c;
1470 1470
    }
1471 1471
}
libswscale/swscale_altivec_template.c
226 226
      for(j=0; j<filterSize; j++) {
227 227
	val += ((int)src[srcPos + j])*filter[filterSize*i + j];
228 228
      }
229
      dst[i] = clip(val>>7, 0, (1<<15)-1);
229
      dst[i] = av_clip(val>>7, 0, (1<<15)-1);
230 230
    }
231 231
  }
232 232
  else
......
265 265
	val_vEven = vec_mule(src_v, filter_v);
266 266
	val_s = vec_sums(val_vEven, vzero);
267 267
	vec_st(val_s, 0, tempo);
268
	dst[i] = clip(tempo[3]>>7, 0, (1<<15)-1);
268
	dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);
269 269
      }
270 270
    }
271 271
    break;
......
292 292
	val_v = vec_msums(src_v, filter_v, (vector signed int)vzero);
293 293
	val_s = vec_sums(val_v, vzero);
294 294
	vec_st(val_s, 0, tempo);
295
	dst[i] = clip(tempo[3]>>7, 0, (1<<15)-1);
295
	dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);
296 296
      }
297 297
    }
298 298
    break;
......
321 321
	vector signed int val_s = vec_sums(val_v, vzero);
322 322

  
323 323
	vec_st(val_s, 0, tempo);
324
	dst[i] = clip(tempo[3]>>7, 0, (1<<15)-1);
324
	dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);
325 325
      }
326 326
    }
327 327
    break;
......
383 383
        val_s = vec_sums(val_v, vzero);
384 384
          
385 385
        vec_st(val_s, 0, tempo);
386
        dst[i] = clip(tempo[3]>>7, 0, (1<<15)-1);        
386
        dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);        
387 387
      }
388 388
      
389 389
    }
libswscale/swscale_template.c
2488 2488
			val += ((int)src[srcPos + j])*filter[filterSize*i + j];
2489 2489
		}
2490 2490
//		filter += hFilterSize;
2491
		dst[i] = clip(val>>7, 0, (1<<15)-1); // the cubic equation does overflow ...
2491
		dst[i] = av_clip(val>>7, 0, (1<<15)-1); // the cubic equation does overflow ...
2492 2492
//		dst[i] = val>>7;
2493 2493
	}
2494 2494
#endif
libswscale/yuv2rgb_init.c
277 277

  
278 278
    for (i = 0; i < 1024; i++) {
279 279
        value = (cy*(((i - YTABLE_MIN)<<16) - oy) + (1<<31))>>32;
280
        ytable[i] = clip_uint8(value);
280
        ytable[i] = av_clip_uint8(value);
281 281
    }
282 282

  
283 283
    entry_size = get_entry_size(fmt_depth(c->dstFormat));

Also available in: Unified diff