/*****************************************************************************
* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#include <vlc_vout.h>
#include "vlc_filter.h"
(char *)&p_filter->fmt_in.video.i_chroma,
(char *)&p_filter->fmt_out.video.i_chroma );
-
return VLC_SUCCESS;
}
if( i_width <= 0 || i_height <= 0 ) return;
#if 0
- printf( "chroma: %4.4s -> %4.4s\n",
+ msg_Dbg( p_filter, "chroma: %4.4s -> %4.4s\n",
(char *)&p_filter->fmt_in.video.i_chroma,
(char *)&p_filter->fmt_out.video.i_chroma );
#endif
#define TRANS_BITS 8
if( (i_pix_pitch == 4)
- && (((((int)p_dst)|((int)p_src1)|i_dst_pitch|i_src1_pitch) & 3) == 0) )
+ && (((((intptr_t)p_dst)|((intptr_t)p_src1)|i_dst_pitch|i_src1_pitch)
+ & 3) == 0) )
{
/*
- ** if picture pixels are 32 bits long and lines addresses are 32 bit aligned,
- ** optimize rendering
+ ** if picture pixels are 32 bits long and lines addresses are 32 bit
+ ** aligned, optimize rendering
*/
uint32_t *p32_dst = (uint32_t *)p_dst;
uint32_t i32_dst_pitch = (uint32_t)(i_dst_pitch>>2);
/* Completely transparent. Don't change pixel */
continue;
}
- else
+ else
{
int i_pos = i_x * i_pix_pitch;
if( i_trans == MAX_TRANS )
/* Completely opaque. Completely overwrite underlying pixel */
p_dst_y[i_x] = p_pal[p_src2[i_x]][0];
- if( b_even_scanline && i_x % 2 == 0 )
+ if( b_even_scanline && ((i_x % 2) == 0) )
{
p_dst_u[i_x/2] = p_pal[p_src2[i_x]][1];
p_dst_v[i_x/2] = p_pal[p_src2[i_x]][2];
(uint16_t)p_src1_y[i_x] * (MAX_TRANS - i_trans) )
>> TRANS_BITS;
- if( b_even_scanline && i_x % 2 == 0 )
+ if( b_even_scanline && ((i_x % 2) == 0) )
{
p_dst_u[i_x/2] = ( (uint16_t)p_pal[p_src2[i_x]][1] * i_trans +
(uint16_t)p_src1_u[i_x/2] * (MAX_TRANS - i_trans) )