本文整理汇总了C++中MPIXEL_X4函数的典型用法代码示例。如果您正苦于以下问题:C++ MPIXEL_X4函数的具体用法?C++ MPIXEL_X4怎么用?C++ MPIXEL_X4使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MPIXEL_X4函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: x264_predict_8x8c_dc_left_c
static void x264_predict_8x8c_dc_left_c( pixel *src )
{
int dc0 = 0, dc1 = 0;
for( int y = 0; y < 4; y++ )
{
dc0 += src[y * FDEC_STRIDE - 1];
dc1 += src[(y+4) * FDEC_STRIDE - 1];
}
pixel4 dc0splat = PIXEL_SPLAT_X4( ( dc0 + 2 ) >> 2 );
pixel4 dc1splat = PIXEL_SPLAT_X4( ( dc1 + 2 ) >> 2 );
for( int y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc0splat;
MPIXEL_X4( src+4 ) = dc0splat;
src += FDEC_STRIDE;
}
for( int y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc1splat;
MPIXEL_X4( src+4 ) = dc1splat;
src += FDEC_STRIDE;
}
}
示例2: x264_predict_8x16c_dc_128_c
static void x264_predict_8x16c_dc_128_c( pixel *src )
{
for( int y = 0; y < 16; y++ )
{
MPIXEL_X4( src+0 ) = PIXEL_SPLAT_X4( 1 << (BIT_DEPTH-1) );
MPIXEL_X4( src+4 ) = PIXEL_SPLAT_X4( 1 << (BIT_DEPTH-1) );
src += FDEC_STRIDE;
}
}
示例3: x264_predict_8x16c_h_c
void x264_predict_8x16c_h_c( pixel *src )
{
for( int i = 0; i < 16; i++ )
{
pixel4 v = PIXEL_SPLAT_X4( src[-1] );
MPIXEL_X4( src+0 ) = v;
MPIXEL_X4( src+4 ) = v;
src += FDEC_STRIDE;
}
}
示例4: x264_predict_16x16_h_c
void x264_predict_16x16_h_c( pixel *src )
{
for( int i = 0; i < 16; i++ )
{
const pixel4 v = PIXEL_SPLAT_X4( src[-1] );
MPIXEL_X4( src+ 0 ) = v;
MPIXEL_X4( src+ 4 ) = v;
MPIXEL_X4( src+ 8 ) = v;
MPIXEL_X4( src+12 ) = v;
src += FDEC_STRIDE;
}
}
示例5: x264_predict_8x16c_v_c
void x264_predict_8x16c_v_c( pixel *src )
{
pixel4 v0 = MPIXEL_X4( src+0-FDEC_STRIDE );
pixel4 v1 = MPIXEL_X4( src+4-FDEC_STRIDE );
for( int i = 0; i < 16; i++ )
{
MPIXEL_X4( src+0 ) = v0;
MPIXEL_X4( src+4 ) = v1;
src += FDEC_STRIDE;
}
}
示例6: x264_predict_8x16c_dc_c
void x264_predict_8x16c_dc_c( pixel *src )
{
int s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0;
/*
s0 s1
s2
s3
s4
s5
*/
for( int i = 0; i < 4; i++ )
{
s0 += src[i+0 - FDEC_STRIDE];
s1 += src[i+4 - FDEC_STRIDE];
s2 += src[-1 + (i+0) * FDEC_STRIDE];
s3 += src[-1 + (i+4) * FDEC_STRIDE];
s4 += src[-1 + (i+8) * FDEC_STRIDE];
s5 += src[-1 + (i+12) * FDEC_STRIDE];
}
/*
dc0 dc1
dc2 dc3
dc4 dc5
dc6 dc7
*/
pixel4 dc0 = PIXEL_SPLAT_X4( ( s0 + s2 + 4 ) >> 3 );
pixel4 dc1 = PIXEL_SPLAT_X4( ( s1 + 2 ) >> 2 );
pixel4 dc2 = PIXEL_SPLAT_X4( ( s3 + 2 ) >> 2 );
pixel4 dc3 = PIXEL_SPLAT_X4( ( s1 + s3 + 4 ) >> 3 );
pixel4 dc4 = PIXEL_SPLAT_X4( ( s4 + 2 ) >> 2 );
pixel4 dc5 = PIXEL_SPLAT_X4( ( s1 + s4 + 4 ) >> 3 );
pixel4 dc6 = PIXEL_SPLAT_X4( ( s5 + 2 ) >> 2 );
pixel4 dc7 = PIXEL_SPLAT_X4( ( s1 + s5 + 4 ) >> 3 );
for( int y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc0;
MPIXEL_X4( src+4 ) = dc1;
src += FDEC_STRIDE;
}
for( int y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc2;
MPIXEL_X4( src+4 ) = dc3;
src += FDEC_STRIDE;
}
for( int y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc4;
MPIXEL_X4( src+4 ) = dc5;
src += FDEC_STRIDE;
}
for( int y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc6;
MPIXEL_X4( src+4 ) = dc7;
src += FDEC_STRIDE;
}
}
示例7: x264_predict_8x8c_dc_c
void x264_predict_8x8c_dc_c( pixel *src )
{
int s0 = 0, s1 = 0, s2 = 0, s3 = 0;
int i;
pixel4 dc0;
pixel4 dc1;
pixel4 dc2;
pixel4 dc3;
int y;
/*
s0 s1
s2
s3
*/
for( i = 0; i < 4; i++ )
{
s0 += src[i - FDEC_STRIDE];
s1 += src[i + 4 - FDEC_STRIDE];
s2 += src[-1 + i * FDEC_STRIDE];
s3 += src[-1 + (i+4)*FDEC_STRIDE];
}
/*
dc0 dc1
dc2 dc3
*/
dc0 = PIXEL_SPLAT_X4( ( s0 + s2 + 4 ) >> 3 );
dc1 = PIXEL_SPLAT_X4( ( s1 + 2 ) >> 2 );
dc2 = PIXEL_SPLAT_X4( ( s3 + 2 ) >> 2 );
dc3 = PIXEL_SPLAT_X4( ( s1 + s3 + 4 ) >> 3 );
for( y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc0;
MPIXEL_X4( src+4 ) = dc1;
src += FDEC_STRIDE;
}
for( y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dc2;
MPIXEL_X4( src+4 ) = dc3;
src += FDEC_STRIDE;
}
}
示例8: x264_predict_8x16c_dc_top_c
static void x264_predict_8x16c_dc_top_c( pixel *src )
{
int dc0 = 0, dc1 = 0;
for(int x = 0; x < 4; x++ )
{
dc0 += src[x - FDEC_STRIDE];
dc1 += src[x + 4 - FDEC_STRIDE];
}
pixel4 dc0splat = PIXEL_SPLAT_X4( ( dc0 + 2 ) >> 2 );
pixel4 dc1splat = PIXEL_SPLAT_X4( ( dc1 + 2 ) >> 2 );
for( int y = 0; y < 16; y++ )
{
MPIXEL_X4( src+0 ) = dc0splat;
MPIXEL_X4( src+4 ) = dc1splat;
src += FDEC_STRIDE;
}
}
示例9: x264_predict_8x16c_dc_left_c
static void x264_predict_8x16c_dc_left_c( pixel *src )
{
for( int i = 0; i < 4; i++ )
{
int dc = 0;
for( int y = 0; y < 4; y++ )
dc += src[y*FDEC_STRIDE - 1];
pixel4 dcsplat = PIXEL_SPLAT_X4( (dc + 2) >> 2 );
for( int y = 0; y < 4; y++ )
{
MPIXEL_X4( src+0 ) = dcsplat;
MPIXEL_X4( src+4 ) = dcsplat;
src += FDEC_STRIDE;
}
}
}
示例10: x264_predict_16x16_v_c
void x264_predict_16x16_v_c( pixel *src )
{
pixel4 v0 = MPIXEL_X4( &src[ 0-FDEC_STRIDE] );
pixel4 v1 = MPIXEL_X4( &src[ 4-FDEC_STRIDE] );
pixel4 v2 = MPIXEL_X4( &src[ 8-FDEC_STRIDE] );
pixel4 v3 = MPIXEL_X4( &src[12-FDEC_STRIDE] );
for( int i = 0; i < 16; i++ )
{
MPIXEL_X4( src+ 0 ) = v0;
MPIXEL_X4( src+ 4 ) = v1;
MPIXEL_X4( src+ 8 ) = v2;
MPIXEL_X4( src+12 ) = v3;
src += FDEC_STRIDE;
}
}