Commit 72869f76 authored by Manuel Rommel's avatar Manuel Rommel Committed by Loren Merritt

update altivec zigzags

parent dbfd2cc7
......@@ -456,11 +456,10 @@ void x264_add16x16_idct8_altivec( uint8_t *dst, int16_t dct[4][8][8] )
x264_add8x8_idct8_altivec( &dst[8*FDEC_STRIDE+8], dct[3] );
}
void x264_zigzag_scan_4x4_frame_altivec( int level[16], int16_t dct[4][4] )
void x264_zigzag_scan_4x4_frame_altivec( int16_t level[16], int16_t dct[4][4] )
{
vec_s16_t dct0v, dct1v;
vec_s16_t tmp0v, tmp1v;
vec_s32_t level0v, level1v, level2v, level3v;
dct0v = vec_ld(0x00, (int16_t*)dct);
dct1v = vec_ld(0x10, (int16_t*)dct);
......@@ -471,22 +470,14 @@ void x264_zigzag_scan_4x4_frame_altivec( int level[16], int16_t dct[4][4] )
tmp0v = vec_perm( dct0v, dct1v, sel0 );
tmp1v = vec_perm( dct0v, dct1v, sel1 );
level0v = vec_unpackh( tmp0v );
level1v = vec_unpackl( tmp0v );
level2v = vec_unpackh( tmp1v );
level3v = vec_unpackl( tmp1v );
vec_st( level0v, 0x00, level );
vec_st( level1v, 0x10, level );
vec_st( level2v, 0x20, level );
vec_st( level3v, 0x30, level );
vec_st( tmp0v, 0x00, level );
vec_st( tmp1v, 0x10, level );
}
void x264_zigzag_scan_4x4_field_altivec( int level[16], int16_t dct[4][4] )
void x264_zigzag_scan_4x4_field_altivec( int16_t level[16], int16_t dct[4][4] )
{
vec_s16_t dct0v, dct1v;
vec_s16_t tmp0v, tmp1v;
vec_s32_t level0v, level1v, level2v, level3v;
dct0v = vec_ld(0x00, (int16_t*)dct);
dct1v = vec_ld(0x10, (int16_t*)dct);
......@@ -496,22 +487,14 @@ void x264_zigzag_scan_4x4_field_altivec( int level[16], int16_t dct[4][4] )
tmp0v = vec_perm( dct0v, dct1v, sel0 );
tmp1v = dct1v;
level0v = vec_unpackh( tmp0v );
level1v = vec_unpackl( tmp0v );
level2v = vec_unpackh( tmp1v );
level3v = vec_unpackl( tmp1v );
vec_st( level0v, 0x00, level );
vec_st( level1v, 0x10, level );
vec_st( level2v, 0x20, level );
vec_st( level3v, 0x30, level );
vec_st( tmp0v, 0x00, level );
vec_st( tmp1v, 0x10, level );
}
void x264_zigzag_scan_4x4ac_frame_altivec( int level[15], int16_t dct[4][4] )
void x264_zigzag_scan_4x4ac_frame_altivec( int16_t level[15], int16_t dct[4][4] )
{
vec_s16_t dct0v, dct1v;
vec_s16_t tmp0v, tmp1v;
vec_s32_t level0v, level1v, level2v, level3v;
dct0v = vec_ld(0x00, (int16_t*)dct);
dct1v = vec_ld(0x10, (int16_t*)dct);
......@@ -522,22 +505,14 @@ void x264_zigzag_scan_4x4ac_frame_altivec( int level[15], int16_t dct[4][4] )
tmp0v = vec_perm( dct0v, dct1v, sel0 );
tmp1v = vec_perm( dct0v, dct1v, sel1 );
level0v = vec_unpackh( tmp0v );
level1v = vec_unpackl( tmp0v );
level2v = vec_unpackh( tmp1v );
level3v = vec_unpackl( tmp1v );
vec_st( level0v, 0x00, level );
vec_st( level1v, 0x10, level );
vec_st( level2v, 0x20, level );
vec_st( level3v, 0x30, level ); // FIXME?: write level[15]
vec_st( tmp0v, 0x00, level );
vec_st( tmp1v, 0x10, level );
}
void x264_zigzag_scan_4x4ac_field_altivec( int level[15], int16_t dct[4][4] )
void x264_zigzag_scan_4x4ac_field_altivec( int16_t level[15], int16_t dct[4][4] )
{
vec_s16_t dct0v, dct1v;
vec_s16_t tmp0v, tmp1v;
vec_s32_t level0v, level1v, level2v, level3v;
dct0v = vec_ld(0x00, (int16_t*)dct);
dct1v = vec_ld(0x10, (int16_t*)dct);
......@@ -548,13 +523,6 @@ void x264_zigzag_scan_4x4ac_field_altivec( int level[15], int16_t dct[4][4] )
tmp0v = vec_perm( dct0v, dct1v, sel0 );
tmp1v = vec_perm( dct0v, dct1v, sel1 );
level0v = vec_unpackh( tmp0v );
level1v = vec_unpackl( tmp0v );
level2v = vec_unpackh( tmp1v );
level3v = vec_unpackl( tmp1v );
vec_st( level0v, 0x00, level );
vec_st( level1v, 0x10, level );
vec_st( level2v, 0x20, level );
vec_st( level3v, 0x30, level ); // FIXME?: write level[15]
vec_st( tmp0v, 0x00, level );
vec_st( tmp1v, 0x10, level );
}
......@@ -44,10 +44,10 @@ void x264_sub16x16_dct8_altivec( int16_t dct[4][8][8],
void x264_add8x8_idct8_altivec( uint8_t *dst, int16_t dct[8][8] );
void x264_add16x16_idct8_altivec( uint8_t *dst, int16_t dct[4][8][8] );
void x264_zigzag_scan_4x4_frame_altivec( int level[16], int16_t dct[4][4] );
void x264_zigzag_scan_4x4ac_frame_altivec( int level[15], int16_t dct[4][4] );
void x264_zigzag_scan_4x4_frame_altivec( int16_t level[16], int16_t dct[4][4] );
void x264_zigzag_scan_4x4ac_frame_altivec( int16_t level[15], int16_t dct[4][4] );
void x264_zigzag_scan_4x4_field_altivec( int level[16], int16_t dct[4][4] );
void x264_zigzag_scan_4x4ac_field_altivec( int level[15], int16_t dct[4][4] );
void x264_zigzag_scan_4x4_field_altivec( int16_t level[16], int16_t dct[4][4] );
void x264_zigzag_scan_4x4ac_field_altivec( int16_t level[15], int16_t dct[4][4] );
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment