* make (*put)() hook return a bool for abort request.

* add an enum for VP8Status() to make things clearer

Change-Id: I458aeabab93f95d28e8ee10be699b677c04b4acb
This commit is contained in:
Pascal Massimino
2011-02-16 14:33:16 -08:00
parent 73c973e6da
commit 746a4820b9
7 changed files with 83 additions and 49 deletions

View File

@ -188,14 +188,16 @@ typedef struct {
CSP_MODE mode;
} Params;
static void CustomPut(const VP8Io* io) {
static int CustomPut(const VP8Io* io) {
Params *p = (Params*)io->opaque;
const int w = io->width;
const int mb_h = io->mb_h;
const int uv_w = (w + 1) / 2;
assert(!(io->mb_y & 1));
if (w <= 0 || mb_h <= 0) return;
if (w <= 0 || mb_h <= 0) {
return 0;
}
if (p->mode == MODE_YUV) {
uint8_t* const y_dst = p->output + io->mb_y * p->stride;
@ -282,6 +284,7 @@ static void CustomPut(const VP8Io* io) {
}
}
}
return 1;
}
//-----------------------------------------------------------------------------