Read about our upcoming Code of Conduct on this issue

Commit 7684bf6b authored by alex@thinkpad's avatar alex@thinkpad
Browse files

mlv_lite: size restrictions (W*H mod 16) are not applicable to lossless compression

--HG--
branch : crop_rec_4k
parent 390b7d7c05db
......@@ -411,7 +411,14 @@ static int calc_res_y(int res_x, int max_res_y, int num, int den, float squeeze)
}
res_y = MIN(res_y, max_res_y);
if (OUTPUT_COMPRESSION)
{
/* no W*H alignment restrictions in this case */
/* just make sure res_y is even */
return res_y & ~1;
}
/* res_x * res_y must be modulo 16 bytes */
switch (MOD(res_x * BPP / 8, 8))
{
......@@ -503,8 +510,11 @@ void update_resolution_params()
int den = aspect_ratio_presets_den[aspect_ratio_index];
res_y = calc_res_y(res_x, max_res_y, num, den, squeeze_factor);
/* check EDMAC restrictions (W * H multiple of 16 bytes) */
ASSERT((res_x * BPP / 8 * res_y) % 16 == 0);
if (!OUTPUT_COMPRESSION)
{
/* check EDMAC restrictions (W * H multiple of 16 bytes) */
ASSERT((res_x * BPP / 8 * res_y) % 16 == 0);
}
/* frame size */
/* should be multiple of 512, so there's no write speed penalty (see http://chdk.setepontos.com/index.php?topic=9970 ; confirmed by benchmarks) */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment