simplify upsampler calls: only allow 'bottom' to be NULL

If 'top' was meant to be NULL, then bottom and top can be
swapped. Logic is simpler.

+ fix compilation in non-FANCY_UPSAMPLING mode

Change-Id: I7c62bbb59454017f072c0945d1ff2d24d89286ff
This commit is contained in:
skal
2013-08-19 12:40:25 -07:00
parent 43a7c8ebee
commit ad6ac32d7c
6 changed files with 48 additions and 29 deletions

View File

@ -820,7 +820,7 @@ int WebPPictureYUVAToARGB(WebPPicture* picture) {
WebPUpsampleLinePairFunc upsample = WebPGetLinePairConverter(ALPHA_IS_LAST);
// First row, with replicated top samples.
upsample(NULL, cur_y, cur_u, cur_v, cur_u, cur_v, NULL, dst, width);
upsample(cur_y, NULL, cur_u, cur_v, cur_u, cur_v, dst, NULL, width);
cur_y += picture->y_stride;
dst += argb_stride;
// Center rows.