uint8_t black_pixel;
uint8_t *p_in, *p_out;
- black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
+ black_pixel = ( p_pic->i_planes > 1 && i_index == Y_PLANE ) ? 0x00
+ : 0x80;
i_num_lines = p_pic->p[i_index].i_visible_lines;
i_pixel_pitch = p_pic->p[i_index].i_pixel_pitch;