mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
Merge "lossless: fix crunch mode w/WEBP_REDUCE_SIZE" into main
This commit is contained in:
commit
7366f7f394
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user