Skip to content
Snippets Groups Projects
Commit dfde8b0e authored by Tristan Matthews's avatar Tristan Matthews Committed by Steve Lhomme
Browse files

daala: decoder: use plane_CopyPixels

parent 295ddcab
No related branches found
No related tags found
Loading
Pipeline #309446 passed with stages
in 44 minutes and 17 seconds
......@@ -561,21 +561,16 @@ static void CloseDecoder( vlc_object_t *p_this )
static void daala_CopyPicture( picture_t *p_pic,
daala_image *ycbcr )
{
const int i_planes = p_pic->i_planes < 3 ? p_pic->i_planes : 3;
const int i_planes = __MIN(p_pic->i_planes, 3);
for( int i_plane = 0; i_plane < i_planes; i_plane++ )
{
const int i_total_lines = __MIN(p_pic->p[i_plane].i_lines,
ycbcr->height >> ycbcr->planes[i_plane].ydec);
uint8_t *p_dst = p_pic->p[i_plane].p_pixels;
uint8_t *p_src = ycbcr->planes[i_plane].data;
const int i_dst_stride = p_pic->p[i_plane].i_pitch;
const int i_src_stride = ycbcr->planes[i_plane].ystride;
for( int i_line = 0; i_line < i_total_lines; i_line++ )
{
memcpy( p_dst, p_src, i_src_stride );
p_src += i_src_stride;
p_dst += i_dst_stride;
}
plane_t src;
src.i_lines = __MIN(p_pic->p[i_plane].i_lines, ycbcr->height >> ycbcr->planes[i_plane].ydec);
src.p_pixels = ycbcr->planes[i_plane].data;
src.i_pitch = ycbcr->planes[i_plane].ystride;
src.i_visible_pitch = src.i_pitch;
src.i_visible_lines = src.i_lines;
plane_CopyPixels( &p_pic->p[i_plane], &src );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment