#include "src/webp/encode.h"
#include <assert.h>
#include <stdlib.h>
#include "src/enc/vp8i_enc.h"
#if !defined(WEBP_REDUCE_SIZE)
#include "src/utils/rescaler_utils.h"
#include "src/utils/utils.h"
#endif
#define HALVE(x) …
static void PictureGrabSpecs(const WebPPicture* const src,
WebPPicture* const dst) { … }
static void SnapTopLeftPosition(const WebPPicture* const pic,
int* const left, int* const top) { … }
static int AdjustAndCheckRectangle(const WebPPicture* const pic,
int* const left, int* const top,
int width, int height) { … }
#if !defined(WEBP_REDUCE_SIZE)
int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) { … }
#endif
int WebPPictureIsView(const WebPPicture* picture) { … }
int WebPPictureView(const WebPPicture* src,
int left, int top, int width, int height,
WebPPicture* dst) { … }
#if !defined(WEBP_REDUCE_SIZE)
int WebPPictureCrop(WebPPicture* pic,
int left, int top, int width, int height) { … }
static int RescalePlane(const uint8_t* src,
int src_width, int src_height, int src_stride,
uint8_t* dst,
int dst_width, int dst_height, int dst_stride,
rescaler_t* const work,
int num_channels) { … }
static void AlphaMultiplyARGB(WebPPicture* const pic, int inverse) { … }
static void AlphaMultiplyY(WebPPicture* const pic, int inverse) { … }
int WebPPictureRescale(WebPPicture* picture, int width, int height) { … }
#else
int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
(void)src;
(void)dst;
return 0;
}
int WebPPictureCrop(WebPPicture* pic,
int left, int top, int width, int height) {
(void)pic;
(void)left;
(void)top;
(void)width;
(void)height;
return 0;
}
int WebPPictureRescale(WebPPicture* pic, int width, int height) {
(void)pic;
(void)width;
(void)height;
return 0;
}
#endif