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:
Pascal Massimino
2011-05-02 17:19:00 -07:00
parent 79cc49f5eb
commit 6d0e66c23e
25 changed files with 658 additions and 132 deletions

View File

@ -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);
}
}
}
}