Commit 76570b11 authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Paul Saman

resizer: move a debug message and pad width to be a multiple of 16 bytes per line

Signed-off-by: Jean-Paul Saman's avatarJean-Paul Saman <jean-paul.saman@m2x.nl>
parent c011fa90
......@@ -108,18 +108,25 @@ static void Resize( decoder_t *p_dec,
else if( i_wratio < VOUT_ASPECT_FACTOR / 4 )
i_wratio = VOUT_ASPECT_FACTOR / 4;
/* choose the minimum for both axes */
i_hratio = i_wratio = i_hratio < i_wratio ? i_hratio : i_wratio;
msg_Dbg( p_dec, "Final resolution %dx%d (%.2f , %.2f)",
i_vidw * i_wratio / VOUT_ASPECT_FACTOR,
i_vidh * i_hratio / VOUT_ASPECT_FACTOR,
(float)i_wratio / VOUT_ASPECT_FACTOR,
(float)i_hratio / VOUT_ASPECT_FACTOR );
/* choose the minimum for both axes */
i_hratio = i_wratio = i_hratio < i_wratio ? i_hratio : i_wratio;
/* and set the new resolution accordingly */
*i_height = (i_vidh * i_hratio) / VOUT_ASPECT_FACTOR;
*i_width = (i_vidw * i_wratio) / VOUT_ASPECT_FACTOR;
/* width must be a factor of 8 : davinci resizer limitation when doing
* vertical upscaling, 16 bytes per output line and Bpp is 2 */
if( i_wratio > 1 && *i_width % 8 )
*i_width = ( *i_width + 7 ) & ~7;
msg_Dbg( p_dec, "Width fixed to %d\n", *i_width );
}
/* open() a framebuffer by its name (NOT device path) */
......
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