Commit 6c2feaea authored by Jean-Paul Saman's avatar Jean-Paul Saman

video_chroma: davinci_resizer: optimize

Optimize division by 2 with a right shift by 1.
parent 01944f68
...@@ -256,12 +256,12 @@ static int Init( filter_t *p_filter, picture_t *p_source, picture_t *p_dest ) ...@@ -256,12 +256,12 @@ static int Init( filter_t *p_filter, picture_t *p_source, picture_t *p_dest )
*/ */
rsz_params_t params; rsz_params_t params;
memset( &params, 0, sizeof( params ) ); memset( &params, 0, sizeof( params ) );
params.in_hsize = p_source->p->i_visible_pitch / 2; params.in_hsize = p_source->p->i_visible_pitch >> 1;
params.in_vsize = p_source->p->i_visible_lines; params.in_vsize = p_source->p->i_visible_lines;
params.in_pitch = p_source->p->i_pitch; params.in_pitch = p_source->p->i_pitch;
params.inptyp = RSZ_INTYPE_YCBCR422_16BIT; params.inptyp = RSZ_INTYPE_YCBCR422_16BIT;
params.pix_fmt = RSZ_PIX_FMT_YUYV; params.pix_fmt = RSZ_PIX_FMT_YUYV;
params.out_hsize = p_dest->p->i_visible_pitch / 2; params.out_hsize = p_dest->p->i_visible_pitch >> 1;
params.out_vsize = p_dest->p->i_visible_lines; params.out_vsize = p_dest->p->i_visible_lines;
params.out_pitch = p_dest->p->i_pitch; params.out_pitch = p_dest->p->i_pitch;
......
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