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

Resizer: fix display when output width changed, comment black color

Signed-off-by: Jean-Paul Saman's avatarJean-Paul Saman <jean-paul.saman@m2x.nl>
parent ae80ab50
......@@ -961,25 +961,18 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
{
Resize( p_dec, VLC_FALSE ); /* convert to YUYV */
/* we write 2 pixels of 2 bytes at a time (packed 4:2:2) */
uint32_t black;
switch( p_dec->fmt_out.video.i_chroma ) /* video input */
{
case VLC_FOURCC('U','Y','V','Y'):
black = 0x88888888;
break;
default:
black = 0;
}
uint32_t black = 0x88888888; /* for vout YUYV */
/* fb */
/* output top & bottom black */
int i_line_len = p_sys->var_info.xres * BPP/8; /* in bytes */
int i_nlines = p_sys->var_info.yres; /* in lines */
/* bytes per input line */
int i_vidw = p_dec->fmt_out.video.i_width * (BPP/8);
/* borders */
int i_sideborder = /* in bytes */
(i_line_len - p_dec->fmt_out.video.i_width * (BPP/8) )/ 2;
int i_sideborder = (i_line_len - i_vidw) / 2; /* in bytes */
int i_edgeborder = /* in lines */
(i_nlines - p_dec->fmt_out.video.i_height) / 2;
......@@ -998,13 +991,12 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
{
assert(p_sys->out.numBufs == 1);
/* bytes per input line */
int i_vidw = p_dec->fmt_out.video.i_width * (BPP/8);
/* draw a line */
int i_vidw_pad = (i_vidw + 15) & ~15;
memcpy( &p_sys->p_fb_map[i*i_line_len + i_sideborder],
&p_sys->p_yuyv[(i-i_edgeborder)*i_vidw],
i_vidw
&p_sys->p_yuyv[(i-i_edgeborder)*i_vidw_pad],
i_vidw_pad
);
/* and black borders */
......
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