1018 |
|
|
1019 |
/****************************************************************************/ |
/****************************************************************************/ |
1020 |
|
|
1021 |
static void (*deintl_core)(unsigned char *, int width, int height, const int stride) = 0; |
static void (*deintl_core)(uint8_t *, int width, int height, const int stride) = 0; |
1022 |
extern void xvid_deinterlace_sse(unsigned char *, int width, int height, const int stride); |
extern void xvid_deinterlace_sse(uint8_t *, int width, int height, const int stride); |
1023 |
|
|
1024 |
#define CLIP_255(x) ( ((x)&~255) ? ((-(x)) >> (8*sizeof((x))-1))&0xff : (x) ) |
#define CLIP_255(x) ( ((x)&~255) ? ((-(x)) >> (8*sizeof((x))-1))&0xff : (x) ) |
1025 |
|
|
1026 |
static void deinterlace_c(unsigned char *pix, int width, int height, const int bps) |
static void deinterlace_c(uint8_t *pix, int width, int height, const int bps) |
1027 |
{ |
{ |
1028 |
pix += bps; |
pix += bps; |
1029 |
while(width-->0) |
while(width-->0) |
1071 |
deintl_core(img->plane[2], width>>1, height>>1, img->stride[2]); |
deintl_core(img->plane[2], width>>1, height>>1, img->stride[2]); |
1072 |
} |
} |
1073 |
else { |
else { |
1074 |
deintl_core(img->plane[0] + ( height -1)*img->stride[0], width, height, -img->stride[0]); |
deintl_core((uint8_t *)img->plane[0] + ( height -1)*img->stride[0], width, height, -img->stride[0]); |
1075 |
deintl_core(img->plane[1] + ((height>>1)-1)*img->stride[1], width>>1, height>>1, -img->stride[1]); |
deintl_core((uint8_t *)img->plane[1] + ((height>>1)-1)*img->stride[1], width>>1, height>>1, -img->stride[1]); |
1076 |
deintl_core(img->plane[2] + ((height>>1)-1)*img->stride[2], width>>1, height>>1, -img->stride[2]); |
deintl_core((uint8_t *)img->plane[2] + ((height>>1)-1)*img->stride[2], width>>1, height>>1, -img->stride[2]); |
1077 |
} |
} |
1078 |
emms(); |
emms(); |
1079 |
|
|