Added support for calling sampling functions via pointers.

Change-Id: Ic4d72e6b175a6b27bcdcc8cd97828e44ea93e743
This commit is contained in:
Djordje Pesut
2014-01-25 18:12:09 +01:00
parent d16c69749b
commit 53520911c3
3 changed files with 28 additions and 17 deletions

View File

@ -553,8 +553,8 @@ static int CustomSetup(VP8Io* io) {
} else {
if (is_rgb) {
p->emit = EmitSampledRGB; // default
#ifdef FANCY_UPSAMPLING
if (io->fancy_upsampling) {
#ifdef FANCY_UPSAMPLING
const int uv_width = (io->mb_w + 1) >> 1;
p->memory = malloc(io->mb_w + 2 * uv_width);
if (p->memory == NULL) {
@ -565,8 +565,10 @@ static int CustomSetup(VP8Io* io) {
p->tmp_v = p->tmp_u + uv_width;
p->emit = EmitFancyRGB;
WebPInitUpsamplers();
}
#endif
} else {
WebPInitSamplers();
}
} else {
p->emit = EmitYUV;
}