fix rescaler vertical interpolation
* vertical expansion now uses bilinear interpolation * heavily assumes that the alpha plane is decoded in full, not row-by-row * split the RescalerExportRow and RescalerImportRow methods into Shrink and Expand variants. * MIPS implementation of ExportRowExpand is missing. There's room for extra speed optim and code re-org, but let's keep that for later patches. addresses https://code.google.com/p/webp/issues/detail?id=254 Change-Id: I8f12b855342bf07dd467fe85e4fde5fd814effdb
This commit is contained in:

committed by
James Zern

parent
cd82440ec7
commit
5ff0079ece
@@ -335,15 +335,35 @@ void WebPInitYUV444Converters(void);
|
||||
struct WebPRescaler;
|
||||
|
||||
// Import a row of data and save its contribution in the rescaler.
|
||||
// 'channel' denotes the channel number to be imported.
|
||||
extern void (*WebPRescalerImportRow)(struct WebPRescaler* const wrk,
|
||||
const uint8_t* const src, int channel);
|
||||
// 'channel' denotes the channel number to be imported. 'Expand' corresponds to
|
||||
// the wrk->x_expand case. Otherwise, 'Shrink' is to be used.
|
||||
typedef void (*WebPRescalerImportRowFunc)(struct WebPRescaler* const wrk,
|
||||
const uint8_t* const src,
|
||||
int channel);
|
||||
|
||||
extern WebPRescalerImportRowFunc WebPRescalerImportRowExpand;
|
||||
extern WebPRescalerImportRowFunc WebPRescalerImportRowShrink;
|
||||
|
||||
// Export one row (starting at x_out position) from rescaler.
|
||||
extern void (*WebPRescalerExportRow)(struct WebPRescaler* const wrk, int x_out);
|
||||
// 'Expand' corresponds to the wrk->y_expand case.
|
||||
// Otherwise 'Shrink' is to be used
|
||||
typedef void (*WebPRescalerExportRowFunc)(struct WebPRescaler* const wrk);
|
||||
extern WebPRescalerExportRowFunc WebPRescalerExportRowExpand;
|
||||
extern WebPRescalerExportRowFunc WebPRescalerExportRowShrink;
|
||||
|
||||
// Plain-C implementation, as fall-back.
|
||||
extern void WebPRescalerExportRowC(struct WebPRescaler* const wrk, int x_out);
|
||||
extern void WebPRescalerImportRowExpandC(struct WebPRescaler* const wrk,
|
||||
const uint8_t* const src, int channel);
|
||||
extern void WebPRescalerImportRowShrinkC(struct WebPRescaler* const wrk,
|
||||
const uint8_t* const src, int channel);
|
||||
extern void WebPRescalerExportRowExpandC(struct WebPRescaler* const wrk);
|
||||
extern void WebPRescalerExportRowShrinkC(struct WebPRescaler* const wrk);
|
||||
|
||||
// Main entry calls:
|
||||
extern void WebPRescalerImportRow(struct WebPRescaler* const wrk,
|
||||
const uint8_t* const src, int channel);
|
||||
// Export one row (starting at x_out position) from rescaler.
|
||||
extern void WebPRescalerExportRow(struct WebPRescaler* const wrk);
|
||||
|
||||
// Must be called first before using the above.
|
||||
void WebPRescalerDspInit(void);
|
||||
|
Reference in New Issue
Block a user