Skip to content
Snippets Groups Projects
Commit ad26d63a authored by Steve Lhomme's avatar Steve Lhomme Committed by Rémi Denis-Courmont
Browse files

picture: align picture width to 64


It seems the latest FFmpeg requires 64 bits alignment for some I420 output.

Fixes #27285

(cherry picked from commit fa75a43b)

Signed-off-by: default avatarSteve Lhomme <robux4@ycbcr.xyz>
parent 535e17ff
No related branches found
No related tags found
2 merge requests!3533Backport MR 3236 to 3.0.x,!2678[3.0] picture: align picture width to 64
Pipeline #272066 passed with stage
in 14 minutes and 41 seconds
......@@ -178,7 +178,7 @@ int picture_Setup( picture_t *p_picture, const video_format_t *restrict fmt )
unsigned int i_ratio_h = 1;
for( unsigned i = 0; i < p_dsc->plane_count; i++ )
{
i_modulo_w = LCM( i_modulo_w, 16 * p_dsc->p[i].w.den );
i_modulo_w = LCM( i_modulo_w, 64 * p_dsc->p[i].w.den );
i_modulo_h = LCM( i_modulo_h, 16 * p_dsc->p[i].h.den );
if( i_ratio_h < p_dsc->p[i].h.den )
i_ratio_h = p_dsc->p[i].h.den;
......@@ -198,7 +198,7 @@ int picture_Setup( picture_t *p_picture, const video_format_t *restrict fmt )
p->i_visible_pitch = (fmt->i_visible_width + (p_dsc->p[i].w.den - 1)) / p_dsc->p[i].w.den * p_dsc->p[i].w.num * p_dsc->pixel_size;
p->i_pixel_pitch = p_dsc->pixel_size;
assert( (p->i_pitch % 16) == 0 );
assert( (p->i_pitch % 64) == 0 );
}
p_picture->i_planes = p_dsc->plane_count;
......
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