[vlc-commits] [Git][videolan/vlc][master] daala: decoder: use plane_CopyPixels
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Jan 31 17:59:27 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
dfde8b0e by Tristan Matthews at 2023-01-31T17:29:00+00:00
daala: decoder: use plane_CopyPixels
- - - - -
1 changed file:
- modules/codec/daala.c
Changes:
=====================================
modules/codec/daala.c
=====================================
@@ -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 );
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfde8b0e0920e2c2140b8c051537f949610c9c51
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfde8b0e0920e2c2140b8c051537f949610c9c51
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list