Commit d9f73a70 authored by Michel Lespinasse's avatar Michel Lespinasse

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...
parent 02752c7c
...@@ -54,7 +54,7 @@ static __inline__ void MotionComponent( ...@@ -54,7 +54,7 @@ static __inline__ void MotionComponent(
boolean_t b_average /* (explicit) averaging of several boolean_t b_average /* (explicit) averaging of several
* predictions */ ) * predictions */ )
{ {
int i_x, i_y, i_x1, i_y1; int i_x, i_y, i_x1;
unsigned int i_dummy; unsigned int i_dummy;
if( !b_average ) if( !b_average )
...@@ -65,9 +65,7 @@ static __inline__ void MotionComponent( ...@@ -65,9 +65,7 @@ static __inline__ void MotionComponent(
{ {
case 0: case 0:
/* !xh, !yh, !average */ /* !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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -79,14 +77,11 @@ static __inline__ void MotionComponent( ...@@ -79,14 +77,11 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
case 1: case 1:
/* xh, !yh, !average */ /* 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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -100,14 +95,11 @@ static __inline__ void MotionComponent( ...@@ -100,14 +95,11 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
case 2: case 2:
/* !xh, yh, !average */ /* !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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -121,14 +113,11 @@ static __inline__ void MotionComponent( ...@@ -121,14 +113,11 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
case 3: case 3:
/* xh, yh, !average (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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -146,7 +135,6 @@ static __inline__ void MotionComponent( ...@@ -146,7 +135,6 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
} }
...@@ -158,9 +146,7 @@ static __inline__ void MotionComponent( ...@@ -158,9 +146,7 @@ static __inline__ void MotionComponent(
{ {
case 0: case 0:
/* !xh, !yh, average */ /* !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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -173,14 +159,11 @@ static __inline__ void MotionComponent( ...@@ -173,14 +159,11 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
case 1: case 1:
/* xh, !yh, average */ /* 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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -195,14 +178,11 @@ static __inline__ void MotionComponent( ...@@ -195,14 +178,11 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
case 2: case 2:
/* !xh, yh, average */ /* !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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -217,14 +197,11 @@ static __inline__ void MotionComponent( ...@@ -217,14 +197,11 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
case 3: case 3:
/* xh, yh, average */ /* 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_x = 0; i_x < i_width; i_x += 8 )
{ {
...@@ -243,7 +220,6 @@ static __inline__ void MotionComponent( ...@@ -243,7 +220,6 @@ static __inline__ void MotionComponent(
p_dest += i_stride; p_dest += i_stride;
p_src += i_stride; p_src += i_stride;
} }
}
break; break;
} }
} }
......
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