i420_rgb.h File Reference

Go to the source code of this file.

Data Structures

struct  filter_sys_t
 filter_sys_t: chroma method descriptor More...

Defines

#define CMAP_RGB2_SIZE   256
 Number of entries in RGB palette/colormap.
#define CONVERT_Y_PIXEL(BPP)
#define CONVERT_YUV_PIXEL(BPP)
#define CONVERT_Y_PIXEL_DITHER(BPP)
#define CONVERT_YUV_PIXEL_DITHER(BPP)
#define CONVERT_4YUV_PIXEL(CHROMA)
#define CONVERT_4YUV_PIXEL_SCALE(CHROMA)
#define SCALE_WIDTH
#define SCALE_WIDTH_DITHER(CHROMA)
#define SCALE_HEIGHT(CHROMA, BPP)
#define SCALE_HEIGHT_DITHER(CHROMA)

Functions

void I420_R5G5B5 (filter_t *, picture_t *, picture_t *)
void I420_R5G6B5 (filter_t *, picture_t *, picture_t *)
void I420_A8R8G8B8 (filter_t *, picture_t *, picture_t *)
void I420_R8G8B8A8 (filter_t *, picture_t *, picture_t *)
void I420_B8G8R8A8 (filter_t *, picture_t *, picture_t *)
void I420_A8B8G8R8 (filter_t *, picture_t *, picture_t *)
static picture_tI420_R5G5B5_Filter (filter_t *, picture_t *)
static picture_tI420_R5G6B5_Filter (filter_t *, picture_t *)
static picture_tI420_A8R8G8B8_Filter (filter_t *, picture_t *)
static picture_tI420_R8G8B8A8_Filter (filter_t *, picture_t *)
static picture_tI420_B8G8R8A8_Filter (filter_t *, picture_t *)
static picture_tI420_A8B8G8R8_Filter (filter_t *, picture_t *)


Define Documentation

#define CMAP_RGB2_SIZE   256

Number of entries in RGB palette/colormap.

#define CONVERT_4YUV_PIXEL ( CHROMA   ) 

Value:

*p_pic++ = p_lookup[                                                      \
        (((*p_y++ + dither10[i_real_y]) >> 4) << 7)                           \
      + ((*p_u + dither20[i_real_y]) >> 5) * 9                                \
      + ((*p_v + dither20[i_real_y]) >> 5) ];                                 \
    *p_pic++ = p_lookup[                                                      \
        (((*p_y++ + dither11[i_real_y]) >> 4) << 7)                           \
      + ((*p_u++ + dither21[i_real_y]) >> 5) * 9                              \
      + ((*p_v++ + dither21[i_real_y]) >> 5) ];                               \
    *p_pic++ = p_lookup[                                                      \
        (((*p_y++ + dither12[i_real_y]) >> 4) << 7)                           \
      + ((*p_u + dither22[i_real_y]) >> 5) * 9                                \
      + ((*p_v + dither22[i_real_y]) >> 5) ];                                 \
    *p_pic++ = p_lookup[                                                      \
        (((*p_y++ + dither13[i_real_y]) >> 4) << 7)                           \
      + ((*p_u++ + dither23[i_real_y]) >> 5) * 9                              \
      + ((*p_v++ + dither23[i_real_y]) >> 5) ];                               \

#define CONVERT_4YUV_PIXEL_SCALE ( CHROMA   ) 

Value:

*p_pic++ = p_lookup[                                                      \
        ( ((*p_y + dither10[i_real_y]) >> 4) << 7)                            \
        + ((*p_u + dither20[i_real_y]) >> 5) * 9                              \
        + ((*p_v + dither20[i_real_y]) >> 5) ];                               \
    p_y += *p_offset++;                                                       \
    p_u += *p_offset;                                                         \
    p_v += *p_offset++;                                                       \
    *p_pic++ = p_lookup[                                                      \
        ( ((*p_y + dither11[i_real_y]) >> 4) << 7)                            \
        + ((*p_u + dither21[i_real_y]) >> 5) * 9                              \
        + ((*p_v + dither21[i_real_y]) >> 5) ];                               \
    p_y += *p_offset++;                                                       \
    p_u += *p_offset;                                                         \
    p_v += *p_offset++;                                                       \
    *p_pic++ = p_lookup[                                                      \
        ( ((*p_y + dither12[i_real_y]) >> 4) << 7)                            \
        + ((*p_u + dither22[i_real_y]) >> 5) * 9                              \
        + ((*p_v + dither22[i_real_y]) >> 5) ];                               \
    p_y += *p_offset++;                                                       \
    p_u += *p_offset;                                                         \
    p_v += *p_offset++;                                                       \
    *p_pic++ = p_lookup[                                                      \
        ( ((*p_y + dither13[i_real_y]) >> 4) << 7)                            \
        + ((*p_u + dither23[i_real_y]) >> 5) * 9                              \
        + ((*p_v + dither23[i_real_y]) >> 5) ];                               \
    p_y += *p_offset++;                                                       \
    p_u += *p_offset;                                                         \
    p_v += *p_offset++;                                                       \

#define CONVERT_Y_PIXEL ( BPP   ) 

Value:

/* Only Y sample is present */                                            \
    p_ybase = p_yuv + *p_y++;                                                 \
    *p_buffer++ = p_ybase[RED_OFFSET-((V_RED_COEF*128)>>SHIFT) + i_red] |     \
        p_ybase[GREEN_OFFSET-(((U_GREEN_COEF+V_GREEN_COEF)*128)>>SHIFT)       \
        + i_green ] | p_ybase[BLUE_OFFSET-((U_BLUE_COEF*128)>>SHIFT) + i_blue];

#define CONVERT_Y_PIXEL_DITHER ( BPP   ) 

Value:

/* Only Y sample is present */                                            \
    p_ybase = p_yuv + *p_y++;                                                 \
    *p_buffer++ = p_ybase[RED_OFFSET-((V_RED_COEF*128+p_dither[i_real_y])>>SHIFT) + i_red] |     \
        p_ybase[GREEN_OFFSET-(((U_GREEN_COEF+V_GREEN_COEF)*128+p_dither[i_real_y])>>SHIFT)       \
        + i_green ] | p_ybase[BLUE_OFFSET-((U_BLUE_COEF*128+p_dither[i_real_y])>>SHIFT) + i_blue];

#define CONVERT_YUV_PIXEL ( BPP   ) 

Value:

/* Y, U and V samples are present */                                      \
    i_uval =    *p_u++;                                                       \
    i_vval =    *p_v++;                                                       \
    i_red =     (V_RED_COEF * i_vval) >> SHIFT;                               \
    i_green =   (U_GREEN_COEF * i_uval + V_GREEN_COEF * i_vval) >> SHIFT;     \
    i_blue =    (U_BLUE_COEF * i_uval) >> SHIFT;                              \
    CONVERT_Y_PIXEL( BPP )                                                    \

#define CONVERT_YUV_PIXEL_DITHER ( BPP   ) 

Value:

/* Y, U and V samples are present */                                      \
    i_uval =    *p_u++;                                                       \
    i_vval =    *p_v++;                                                       \
    i_red =     (V_RED_COEF * i_vval) >> SHIFT;                               \
    i_green =   (U_GREEN_COEF * i_uval + V_GREEN_COEF * i_vval) >> SHIFT;     \
    i_blue =    (U_BLUE_COEF * i_uval) >> SHIFT;                              \
    CONVERT_Y_PIXEL_DITHER( BPP )                                             \

#define SCALE_HEIGHT ( CHROMA,
BPP   ) 

#define SCALE_HEIGHT_DITHER ( CHROMA   ) 

#define SCALE_WIDTH

#define SCALE_WIDTH_DITHER ( CHROMA   ) 

Value:

if( b_hscale )                                                            \
    {                                                                         \
        /* Horizontal scaling - we can't use a buffer due to dithering */     \
        p_offset = p_offset_start;                                            \
        for( i_x = p_filter->fmt_out.video.i_width / 16; i_x--; )             \
        {                                                                     \
            CONVERT_4YUV_PIXEL_SCALE( CHROMA )                                \
            CONVERT_4YUV_PIXEL_SCALE( CHROMA )                                \
            CONVERT_4YUV_PIXEL_SCALE( CHROMA )                                \
            CONVERT_4YUV_PIXEL_SCALE( CHROMA )                                \
        }                                                                     \
    }                                                                         \
    else                                                                      \
    {                                                                         \
        for( i_x = p_filter->fmt_in.video.i_width / 16; i_x--;  )             \
        {                                                                     \
            CONVERT_4YUV_PIXEL( CHROMA )                                      \
            CONVERT_4YUV_PIXEL( CHROMA )                                      \
            CONVERT_4YUV_PIXEL( CHROMA )                                      \
            CONVERT_4YUV_PIXEL( CHROMA )                                      \
        }                                                                     \
    }                                                                         \
    /* Increment of picture pointer to end of line is still needed */         \
    p_pic = (void*)((uint8_t*)p_pic + i_right_margin );                       \
                                                                              \
    /* Increment the Y coordinate in the matrix, modulo 4 */                  \
    i_real_y = (i_real_y + 1) & 0x3;                                          \


Function Documentation

void I420_A8B8G8R8 ( filter_t ,
picture_t ,
picture_t  
)

static picture_t* I420_A8B8G8R8_Filter ( filter_t ,
picture_t  
) [static]

void I420_A8R8G8B8 ( filter_t ,
picture_t ,
picture_t  
)

static picture_t* I420_A8R8G8B8_Filter ( filter_t ,
picture_t  
) [static]

void I420_B8G8R8A8 ( filter_t ,
picture_t ,
picture_t  
)

static picture_t* I420_B8G8R8A8_Filter ( filter_t ,
picture_t  
) [static]

void I420_R5G5B5 ( filter_t ,
picture_t ,
picture_t  
)

static picture_t* I420_R5G5B5_Filter ( filter_t ,
picture_t  
) [static]

void I420_R5G6B5 ( filter_t ,
picture_t ,
picture_t  
)

static picture_t* I420_R5G6B5_Filter ( filter_t ,
picture_t  
) [static]

void I420_R8G8B8A8 ( filter_t ,
picture_t ,
picture_t  
)

static picture_t* I420_R8G8B8A8_Filter ( filter_t ,
picture_t  
) [static]


Generated on Wed Aug 13 08:04:50 2008 for VLC by  doxygen 1.5.1