mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
fix rescaling-with-alpha inaccuracy
(still missing YUVA decoding case for now) https://code.google.com/p/webp/issues/detail?id=160 Change-Id: If723b4a5c0a303d0853ec9d839f995adce056095
This commit is contained in:
@ -38,7 +38,8 @@ typedef struct {
|
||||
} WebPRescaler;
|
||||
|
||||
// Initialize a rescaler given scratch area 'work' and dimensions of src & dst.
|
||||
void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height,
|
||||
void WebPRescalerInit(WebPRescaler* const rescaler,
|
||||
int src_width, int src_height,
|
||||
uint8_t* const dst,
|
||||
int dst_width, int dst_height, int dst_stride,
|
||||
int num_channels,
|
||||
@ -46,6 +47,11 @@ void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height,
|
||||
int y_add, int y_sub,
|
||||
int32_t* const work);
|
||||
|
||||
// Returns the number of input lines needed next to produce one output line,
|
||||
// considering that the maximum available input lines are 'max_num_lines'.
|
||||
int WebPRescaleNeededLines(const WebPRescaler* const rescaler,
|
||||
int max_num_lines);
|
||||
|
||||
// Import a row of data and save its contribution in the rescaler.
|
||||
// 'channel' denotes the channel number to be imported.
|
||||
void WebPRescalerImportRow(WebPRescaler* const rescaler,
|
||||
@ -64,10 +70,10 @@ int WebPRescalerHasPendingOutput(const WebPRescaler* const rescaler) {
|
||||
|
||||
// Export one row from rescaler. Returns the pointer where output was written,
|
||||
// or NULL if no row was pending.
|
||||
uint8_t* WebPRescalerExportRow(WebPRescaler* const wrk);
|
||||
uint8_t* WebPRescalerExportRow(WebPRescaler* const rescaler);
|
||||
|
||||
// Export as many rows as possible. Return the numbers of rows written.
|
||||
int WebPRescalerExport(WebPRescaler* const wrk);
|
||||
int WebPRescalerExport(WebPRescaler* const rescaler);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user