take colorspace into account when cropping

(cherry picked from commit 4e33653b52637c74ae30adde7990265d1d43994b)

Conflicts:

	src/dec/vp8l.c
This commit is contained in:
Pascal Massimino
2012-03-27 12:24:56 +00:00
committed by James Zern
parent 61c2d51fd7
commit 1db888ba40
3 changed files with 20 additions and 15 deletions

View File

@ -121,6 +121,11 @@ VP8StatusCode WebPParseHeaders(const uint8_t** data, uint32_t* data_size,
// hooks will use the supplied 'params' as io->opaque handle.
void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io);
// Setup crop_xxx fields, mb_w and mb_h in io. 'src_colorspace' refers
// to the *compressed* format, not the output one.
int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
VP8Io* const io, WEBP_CSP_MODE src_colorspace);
//------------------------------------------------------------------------------
// Internal functions regarding WebPDecBuffer memory (in buffer.c).
// Don't really need to be externally visible for now.
@ -144,12 +149,7 @@ void WebPCopyDecBuffer(const WebPDecBuffer* const src,
// Copy and transfer ownership from src to dst (beware of parameter order!)
void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst);
//------------------------------------------------------------------------------
// Cropping and rescaling.
// Setup crop_xxx fields, mb_w and mb_h
int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
VP8Io* const io);
//------------------------------------------------------------------------------