mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
prepare experimentation with yuv444 / 422
+ add a simple rescaling function: WebPPictureRescale() for encoding + clean-up the memory managment around the alpha plane + fix some includes path by using "../webp/xxx.h" instead of "webp/xxx.h" New flags for 'cwebp': -resize <width> <height> -444 (no effect) -422 (no effect) -400 Change-Id: I25a95f901493f939c2dd789e658493b83bd1abfa
This commit is contained in:
@ -148,11 +148,13 @@ void VP8IteratorExport(const VP8EncIterator* const it) {
|
||||
memcpy(ydst + i * pic->y_stride, ysrc + i * BPS, w);
|
||||
}
|
||||
// U/V plane
|
||||
w = (w + 1) / 2;
|
||||
h = (h + 1) / 2;
|
||||
for (i = 0; i < h; ++i) {
|
||||
memcpy(udst + i * pic->uv_stride, usrc + i * BPS, w);
|
||||
memcpy(vdst + i * pic->uv_stride, vsrc + i * BPS, w);
|
||||
{
|
||||
const int uv_w = (w + 1) / 2;
|
||||
const int uv_h = (h + 1) / 2;
|
||||
for (i = 0; i < uv_h; ++i) {
|
||||
memcpy(udst + i * pic->uv_stride, usrc + i * BPS, uv_w);
|
||||
memcpy(vdst + i * pic->uv_stride, vsrc + i * BPS, uv_w);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user