Merge "lossless: fix crunch mode w/WEBP_REDUCE_SIZE" into main

This commit is contained in:
James Zern 2022-07-21 16:27:38 +00:00 committed by Gerrit Code Review
commit 7366f7f394

View File

@ -13,14 +13,15 @@
#include "src/webp/encode.h" #include "src/webp/encode.h"
#if !defined(WEBP_REDUCE_SIZE)
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include "src/enc/vp8i_enc.h" #include "src/enc/vp8i_enc.h"
#if !defined(WEBP_REDUCE_SIZE)
#include "src/utils/rescaler_utils.h" #include "src/utils/rescaler_utils.h"
#include "src/utils/utils.h" #include "src/utils/utils.h"
#endif // !defined(WEBP_REDUCE_SIZE)
#define HALVE(x) (((x) + 1) >> 1) #define HALVE(x) (((x) + 1) >> 1)
@ -56,6 +57,7 @@ static int AdjustAndCheckRectangle(const WebPPicture* const pic,
return 1; return 1;
} }
#if !defined(WEBP_REDUCE_SIZE)
int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) { int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
if (src == NULL || dst == NULL) return 0; if (src == NULL || dst == NULL) return 0;
if (src == dst) return 1; if (src == dst) return 1;
@ -81,6 +83,7 @@ int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
} }
return 1; return 1;
} }
#endif // !defined(WEBP_REDUCE_SIZE)
int WebPPictureIsView(const WebPPicture* picture) { int WebPPictureIsView(const WebPPicture* picture) {
if (picture == NULL) return 0; if (picture == NULL) return 0;
@ -120,6 +123,7 @@ int WebPPictureView(const WebPPicture* src,
return 1; return 1;
} }
#if !defined(WEBP_REDUCE_SIZE)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Picture cropping // Picture cropping
@ -277,23 +281,6 @@ int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
return 0; return 0;
} }
int WebPPictureIsView(const WebPPicture* picture) {
(void)picture;
return 0;
}
int WebPPictureView(const WebPPicture* src,
int left, int top, int width, int height,
WebPPicture* dst) {
(void)src;
(void)left;
(void)top;
(void)width;
(void)height;
(void)dst;
return 0;
}
int WebPPictureCrop(WebPPicture* pic, int WebPPictureCrop(WebPPicture* pic,
int left, int top, int width, int height) { int left, int top, int width, int height) {
(void)pic; (void)pic;