# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_filter.h>
#include "i420_rgb.h"
#if defined (MODULE_NAME_IS_i420_rgb)
# include "i420_rgb_c.h"
#elif defined (MODULE_NAME_IS_i420_rgb_mmx)
-# include "i420_rgb_mmx.h"
+# include "../mmx/i420_rgb_mmx.h"
#elif defined (MODULE_NAME_IS_i420_rgb_sse2)
-# include "i420_rgb_mmx.h"
+# include "../mmx/i420_rgb_mmx.h"
#endif
static void SetOffset( int, int, int, int, bool *,
}
i_right_margin = p_dest->p->i_pitch - p_dest->p->i_visible_pitch;
-
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
/* Rule: when a picture of size (x1,y1) with aspect ratio r1 is rendered
* on a picture of size (x2,y2) with aspect ratio r2, if x1 grows to x1'
- p_src->p[1].i_visible_pitch;
i_right_margin = p_dest->p->i_pitch - p_dest->p->i_visible_pitch;
-
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
/* Rule: when a picture of size (x1,y1) with aspect ratio r1 is rendered
* on a picture of size (x2,y2) with aspect ratio r2, if x1 grows to x1'
#if defined (MODULE_NAME_IS_i420_rgb_sse2)
- if( p_filter->fmt_in.video.i_width & 15 )
- {
- i_rewind = 16 - ( p_filter->fmt_in.video.i_width & 15 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 15;
/*
** SSE2 128 bits fetch/store instructions are faster
#else // defined (MODULE_NAME_IS_i420_rgb_mmx)
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
for( i_y = 0; i_y < p_filter->fmt_in.video.i_height; i_y++ )
{
#if defined (MODULE_NAME_IS_i420_rgb_sse2)
- if( p_filter->fmt_in.video.i_width & 15 )
- {
- i_rewind = 16 - ( p_filter->fmt_in.video.i_width & 15 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 15;
/*
** SSE2 128 bits fetch/store instructions are faster
#else // defined (MODULE_NAME_IS_i420_rgb_mmx)
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
for( i_y = 0; i_y < p_filter->fmt_in.video.i_height; i_y++ )
{
- p_src->p[1].i_visible_pitch;
i_right_margin = p_dest->p->i_pitch - p_dest->p->i_visible_pitch;
-
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
/* Rule: when a picture of size (x1,y1) with aspect ratio r1 is rendered
* on a picture of size (x2,y2) with aspect ratio r2, if x1 grows to x1'
#if defined (MODULE_NAME_IS_i420_rgb_sse2)
- if( p_filter->fmt_in.video.i_width & 15 )
- {
- i_rewind = 16 - ( p_filter->fmt_in.video.i_width & 15 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 15;
/*
** SSE2 128 bits fetch/store instructions are faster
#else // defined (MODULE_NAME_IS_i420_rgb_mmx)
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
for( i_y = 0; i_y < p_filter->fmt_in.video.i_height; i_y++ )
{
#if defined (MODULE_NAME_IS_i420_rgb_sse2)
- if( p_filter->fmt_in.video.i_width & 15 )
- {
- i_rewind = 16 - ( p_filter->fmt_in.video.i_width & 15 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 15;
/*
** SSE2 128 bits fetch/store instructions are faster
#else // defined (MODULE_NAME_IS_i420_rgb_mmx)
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
for( i_y = 0; i_y < p_filter->fmt_in.video.i_height; i_y++ )
{
#if defined (MODULE_NAME_IS_i420_rgb_sse2)
- if( p_filter->fmt_in.video.i_width & 15 )
- {
- i_rewind = 16 - ( p_filter->fmt_in.video.i_width & 15 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 15;
/*
** SSE2 128 bits fetch/store instructions are faster
#else
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
for( i_y = 0; i_y < p_filter->fmt_in.video.i_height; i_y++ )
{
#if defined (MODULE_NAME_IS_i420_rgb_sse2)
- if( p_filter->fmt_in.video.i_width & 15 )
- {
- i_rewind = 16 - ( p_filter->fmt_in.video.i_width & 15 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 15;
/*
** SSE2 128 bits fetch/store instructions are faster
#else
- if( p_filter->fmt_in.video.i_width & 7 )
- {
- i_rewind = 8 - ( p_filter->fmt_in.video.i_width & 7 );
- }
- else
- {
- i_rewind = 0;
- }
+ i_rewind = (-p_filter->fmt_in.video.i_width) & 7;
for( i_y = 0; i_y < p_filter->fmt_in.video.i_height; i_y++ )
{