From d9f73a7039063f0b0d38486fbef8252549854dd8 Mon Sep 17 00:00:00 2001 From: Michel Lespinasse Date: Tue, 22 Feb 2000 14:09:51 +0000 Subject: [PATCH] Modification mineure MotionComponent : changement d'une boucle imbriquee sur i_y et i_y1 en une boucle simple sur i_y... Le changement en vitesse comme en taille est chouillatique mais neanmoins positif. Ca n'a pas d'effet sur l'unrolling de boucle car celui-ci est effectue sur une boucle plus interne... --- src/video_decoder/vdec_motion.c | 42 +++++++-------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/src/video_decoder/vdec_motion.c b/src/video_decoder/vdec_motion.c index ebe5a203e9..99a2ec380d 100644 --- a/src/video_decoder/vdec_motion.c +++ b/src/video_decoder/vdec_motion.c @@ -54,7 +54,7 @@ static __inline__ void MotionComponent( boolean_t b_average /* (explicit) averaging of several * predictions */ ) { - int i_x, i_y, i_x1, i_y1; + int i_x, i_y, i_x1; unsigned int i_dummy; if( !b_average ) @@ -65,10 +65,8 @@ static __inline__ void MotionComponent( { case 0: /* !xh, !yh, !average */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -78,16 +76,13 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; case 1: /* xh, !yh, !average */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -99,16 +94,13 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; case 2: /* !xh, yh, !average */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -120,16 +112,13 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; case 3: /* xh, yh, !average (3) */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -145,7 +134,6 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; } @@ -158,10 +146,8 @@ static __inline__ void MotionComponent( { case 0: /* !xh, !yh, average */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -172,16 +158,13 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; case 1: /* xh, !yh, average */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -194,16 +177,13 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; case 2: /* !xh, yh, average */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -216,16 +196,13 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; case 3: /* xh, yh, average */ - for( i_y = 0; i_y < i_height; i_y += 4 ) + for( i_y = 0; i_y < i_height; i_y ++ ) { - for( i_y1 = 0; i_y1 < 4; i_y1++ ) - { for( i_x = 0; i_x < i_width; i_x += 8 ) { for( i_x1 = 0; i_x1 < 8; i_x1++ ) @@ -242,7 +219,6 @@ static __inline__ void MotionComponent( } p_dest += i_stride; p_src += i_stride; - } } break; } -- 2.39.2