Defines | Functions | Variables

libavcodec/x86/fdct_mmx.c File Reference

#include "libavutil/common.h"
#include "libavcodec/dsputil.h"

Go to the source code of this file.

Defines

#define BITS_FRW_ACC   3
#define SHIFT_FRW_COL   BITS_FRW_ACC
#define SHIFT_FRW_ROW   (BITS_FRW_ACC + 17 - 3)
#define RND_FRW_ROW   (1 << (SHIFT_FRW_ROW-1))
#define X8(x)   x,x,x,x,x,x,x,x
#define TABLE_SSE2
#define C1   22725
#define C2   21407
#define C3   19266
#define C4   16384
#define C5   12873
#define C6   8867
#define C7   4520
#define C1   31521
#define C2   29692
#define C3   26722
#define C4   22725
#define C5   17855
#define C6   12299
#define C7   6270
#define C1   29692
#define C2   27969
#define C3   25172
#define C4   21407
#define C5   16819
#define C6   11585
#define C7   5906
#define C1   26722
#define C2   25172
#define C3   22654
#define C4   19266
#define C5   15137
#define C6   10426
#define C7   5315
#define C1   22725
#define C2   21407
#define C3   19266
#define C4   16384
#define C5   12873
#define C6   8867
#define C7   4520
#define C1   26722
#define C2   25172
#define C3   22654
#define C4   19266
#define C5   15137
#define C6   10426
#define C7   5315
#define C1   29692
#define C2   27969
#define C3   25172
#define C4   21407
#define C5   16819
#define C6   11585
#define C7   5906
#define C1   31521
#define C2   29692
#define C3   26722
#define C4   22725
#define C5   17855
#define C6   12299
#define C7   6270
#define S(s)   AV_TOSTRING(s)
#define FDCT_COL(cpu, mm, mov)
#define FDCT_ROW_SSE2_H1(i, t)
#define FDCT_ROW_SSE2_H2(i, t)
#define FDCT_ROW_SSE2(i)

Functions

 DECLARE_ALIGNED (16, static const int16_t, fdct_tg_all_16)[24]
 DECLARE_ALIGNED (16, static const int16_t, ocos_4_16)[8]
 DECLARE_ALIGNED (16, static const int16_t, fdct_one_corr)[8]
 DECLARE_ALIGNED (8, static const int32_t, fdct_r_row)[2]
 DECLARE_ALIGNED (8, static const int16_t, tab_frw_01234567)[]
static av_always_inline void fdct_row_sse2 (const int16_t *in, int16_t *out)
static av_always_inline void fdct_row_mmx2 (const int16_t *in, int16_t *out, const int16_t *table)
static av_always_inline void fdct_row_mmx (const int16_t *in, int16_t *out, const int16_t *table)
void ff_fdct_mmx (int16_t *block)
void ff_fdct_mmx2 (int16_t *block)
void ff_fdct_sse2 (int16_t *block)

Variables

struct {
fdct_r_row_sse2
struct {
tab_frw_01234567_sse2

Define Documentation

#define BITS_FRW_ACC   3

Definition at line 47 of file fdct_mmx.c.

#define C1   29692
#define C1   22725
#define C1   26722
#define C1   22725
#define C1   29692
#define C1   31521
#define C1   26722
#define C1   31521
#define C2   21407
#define C2   21407
#define C2   25172
#define C2   27969
#define C2   27969
#define C2   29692
#define C2   25172
#define C2   29692
#define C3   19266
#define C3   26722
#define C3   19266
#define C3   22654
#define C3   25172
#define C3   25172
#define C3   26722
#define C3   22654
#define C4   22725
#define C4   16384
#define C4   22725
#define C4   16384
#define C4   19266
#define C4   21407
#define C4   21407
#define C4   19266
#define C5   15137
#define C5   17855
#define C5   12873
#define C5   12873
#define C5   15137
#define C5   16819
#define C5   17855
#define C5   16819
#define C6   8867
#define C6   10426
#define C6   10426
#define C6   12299
#define C6   8867
#define C6   11585
#define C6   11585
#define C6   12299
#define C7   5315
#define C7   5315
#define C7   5906
#define C7   4520
#define C7   6270
#define C7   4520
#define C7   5906
#define C7   6270
#define FDCT_COL (   cpu,
  mm,
  mov 
)

Definition at line 288 of file fdct_mmx.c.

#define FDCT_ROW_SSE2 (   i  ) 
Value:
"movq      %%xmm2, %%xmm1       \n\t" \
        "pshuflw   $27, %%xmm0, %%xmm0  \n\t" \
        "paddsw    %%xmm0, %%xmm1       \n\t" \
        "psubsw    %%xmm0, %%xmm2       \n\t" \
        "punpckldq %%xmm2, %%xmm1       \n\t" \
        "pshufd    $78, %%xmm1, %%xmm2  \n\t" \
        "pmaddwd   %%xmm2, %%xmm3       \n\t" \
        "pmaddwd   %%xmm1, %%xmm7       \n\t" \
        "pmaddwd   %%xmm5, %%xmm2       \n\t" \
        "pmaddwd   %%xmm4, %%xmm1       \n\t" \
        "paddd     %%xmm7, %%xmm3       \n\t" \
        "paddd     %%xmm2, %%xmm1       \n\t" \
        "paddd     %%xmm6, %%xmm3       \n\t" \
        "paddd     %%xmm6, %%xmm1       \n\t" \
        "psrad     %3, %%xmm3           \n\t" \
        "psrad     %3, %%xmm1           \n\t" \
        "packssdw  %%xmm3, %%xmm1       \n\t" \
        "movdqa    %%xmm1, " #i "(%4)   \n\t"

Referenced by fdct_row_sse2().

#define FDCT_ROW_SSE2_H1 (   i,
  t 
)
Value:
"movq      " #i "(%0), %%xmm2      \n\t" \
        "movq      " #i "+8(%0), %%xmm0    \n\t" \
        "movdqa    " #t "+32(%1), %%xmm3   \n\t" \
        "movdqa    " #t "+48(%1), %%xmm7   \n\t" \
        "movdqa    " #t "(%1), %%xmm4      \n\t" \
        "movdqa    " #t "+16(%1), %%xmm5   \n\t"

Referenced by fdct_row_sse2().

#define FDCT_ROW_SSE2_H2 (   i,
  t 
)
Value:
"movq      " #i "(%0), %%xmm2      \n\t" \
        "movq      " #i "+8(%0), %%xmm0    \n\t" \
        "movdqa    " #t "+32(%1), %%xmm3   \n\t" \
        "movdqa    " #t "+48(%1), %%xmm7   \n\t"

Referenced by fdct_row_sse2().

#define RND_FRW_ROW   (1 << (SHIFT_FRW_ROW-1))

Definition at line 50 of file fdct_mmx.c.

#define S (   s  )     AV_TOSTRING(s)

Definition at line 286 of file fdct_mmx.c.

Referenced by fdct_row_mmx(), and fdct_row_mmx2().

#define SHIFT_FRW_COL   BITS_FRW_ACC

Definition at line 48 of file fdct_mmx.c.

#define SHIFT_FRW_ROW   (BITS_FRW_ACC + 17 - 3)

Definition at line 49 of file fdct_mmx.c.

Referenced by fdct_row_mmx(), fdct_row_mmx2(), and fdct_row_sse2().

#define TABLE_SSE2
Value:
C4,  C4,  C1,  C3, -C6, -C2, -C1, -C5, \
                   C4,  C4,  C5,  C7,  C2,  C6,  C3, -C7, \
                  -C4,  C4,  C7,  C3,  C6, -C2,  C7, -C5, \
                   C4, -C4,  C5, -C1,  C2, -C6,  C3, -C1,
#define X8 (   x  )     x,x,x,x,x,x,x,x

Definition at line 53 of file fdct_mmx.c.


Function Documentation

DECLARE_ALIGNED ( 16  ,
static const   int16_t,
fdct_tg_all_16   
)
DECLARE_ALIGNED ( 16  ,
static const   int16_t,
ocos_4_16   
)
DECLARE_ALIGNED ( ,
static const   int32_t,
fdct_r_row   
)
DECLARE_ALIGNED ( ,
static const   int16_t,
tab_frw_01234567   
)
DECLARE_ALIGNED ( 16  ,
static const   int16_t,
fdct_one_corr   
)
static av_always_inline void fdct_row_mmx ( const int16_t *  in,
int16_t *  out,
const int16_t *  table 
) [static]

Definition at line 483 of file fdct_mmx.c.

Referenced by ff_fdct_mmx().

static av_always_inline void fdct_row_mmx2 ( const int16_t *  in,
int16_t *  out,
const int16_t *  table 
) [static]

Definition at line 437 of file fdct_mmx.c.

Referenced by ff_fdct_mmx2().

static av_always_inline void fdct_row_sse2 ( const int16_t *  in,
int16_t *  out 
) [static]

Definition at line 375 of file fdct_mmx.c.

Referenced by ff_fdct_sse2().

void ff_fdct_mmx ( int16_t *  block  ) 

Definition at line 534 of file fdct_mmx.c.

void ff_fdct_mmx2 ( int16_t *  block  ) 

Definition at line 552 of file fdct_mmx.c.

void ff_fdct_sse2 ( int16_t *  block  ) 

Definition at line 570 of file fdct_mmx.c.


Variable Documentation

struct { ... } fdct_r_row_sse2 [static]

Referenced by fdct_row_sse2().

struct { ... } tab_frw_01234567_sse2 [static]

Referenced by fdct_row_sse2().