mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-19 23:39:58 +02:00
Make rescaler methods generic
to be used in rescaling of lossless bitstreams. (cherry picked from commit 2e12a3045498b6faf13b93bc25391e8226119f0a)
This commit is contained in:
@ -27,6 +27,7 @@ typedef int (*OutputFunc)(const VP8Io* const io, WebPDecParams* const p);
|
||||
// Structure use for on-the-fly rescaling
|
||||
typedef struct {
|
||||
int x_expand; // true if we're expanding in the x direction
|
||||
int num_channels; // bytes to jump between pixels
|
||||
int fy_scale, fx_scale; // fixed-point scaling factor
|
||||
int64_t fxy_scale; // ''
|
||||
// we need hpel-precise add/sub increments, for the downsampled U/V planes.
|
||||
@ -168,12 +169,14 @@ int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
|
||||
|
||||
// Initialize a rescaler given scratch area 'work' and dimensions of src & dst.
|
||||
void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height,
|
||||
uint8_t* dst, int dst_width, int dst_height,
|
||||
int dst_stride, int x_add, int x_sub, int y_add,
|
||||
int y_sub, int32_t* work);
|
||||
uint8_t* const dst, int dst_width, int dst_height,
|
||||
int dst_stride, int num_channels, int x_add, int x_sub,
|
||||
int y_add, int y_sub, int32_t* const work);
|
||||
|
||||
// Import a row of data and save its contribution in the rescaler.
|
||||
void WebPRescalerImportRow(const uint8_t* const src, WebPRescaler* const wrk);
|
||||
// 'channel' denotes the channel number to be imported.
|
||||
void WebPRescalerImportRow(const uint8_t* const src, int channel,
|
||||
WebPRescaler* const wrk);
|
||||
|
||||
// Export a row from rescaler.
|
||||
void WebPRescalerExportRow(WebPRescaler* const wrk);
|
||||
|
Reference in New Issue
Block a user