25 #define DEF(x, y) x ## _no_rnd_ ## y ##_iwmmxt
26 #define SET_RND(regd) __asm__ volatile ("mov r12, #1 \n\t tbcsth " #regd ", r12":::"r12");
27 #define WAVG2B "wavg2b"
33 #define DEF(x, y) x ## _ ## y ##_iwmmxt
34 #define SET_RND(regd) __asm__ volatile ("mov r12, #2 \n\t tbcsth " #regd ", r12":::"r12");
35 #define WAVG2B "wavg2br"
45 "and r12, %[pixels], #7 \n\t" \
46 "bic %[pixels], %[pixels], #7 \n\t" \
47 "tmcr wcgr1, r12 \n\t" \
49 "wldrd wr0, [%[pixels]] \n\t" \
50 "wldrd wr1, [%[pixels], #8] \n\t" \
51 "add %[pixels], %[pixels], %[line_size] \n\t" \
52 "walignr1 wr4, wr0, wr1 \n\t" \
56 "wldrd wr2, [%[pixels]] \n\t" \
57 "wldrd wr3, [%[pixels], #8] \n\t" \
58 "add %[pixels], %[pixels], %[line_size] \n\t" \
59 "pld [%[pixels]] \n\t" \
60 "walignr1 wr5, wr2, wr3 \n\t" \
61 AVG " wr6, wr4, wr5 \n\t" \
62 "wstrd wr6, [%[block]] \n\t" \
63 "add %[block], %[block], %[line_size] \n\t" \
65 "wldrd wr0, [%[pixels]] \n\t" \
66 "wldrd wr1, [%[pixels], #8] \n\t" \
67 "add %[pixels], %[pixels], %[line_size] \n\t" \
68 "walignr1 wr4, wr0, wr1 \n\t" \
69 "pld [%[pixels]] \n\t" \
70 AVG " wr6, wr4, wr5 \n\t" \
71 "wstrd wr6, [%[block]] \n\t" \
72 "add %[block], %[block], %[line_size] \n\t" \
74 "subs %[h], %[h], #2 \n\t" \
76 : [block]"+r"(block), [pixels]"+r"(pixels), [h]"+r"(h) \
77 : [line_size]"r"(line_size) \
91 uint8_t *pixels2 = pixels + line_size;
96 "pld [%[pixels], %[line_size2]] \n\t"
97 "pld [%[pixels2], %[line_size2]] \n\t"
98 "wldrd wr4, [%[pixels]] \n\t"
99 "wldrd wr5, [%[pixels2]] \n\t"
100 "pld [%[block], #32] \n\t"
101 "wunpckelub wr6, wr4 \n\t"
102 "wldrd wr0, [%[block]] \n\t"
103 "wunpckehub wr7, wr4 \n\t"
104 "wldrd wr1, [%[block], #8] \n\t"
105 "wunpckelub wr8, wr5 \n\t"
106 "wldrd wr2, [%[block], #16] \n\t"
107 "wunpckehub wr9, wr5 \n\t"
108 "wldrd wr3, [%[block], #24] \n\t"
109 "add %[block], %[block], #32 \n\t"
110 "waddhss wr10, wr0, wr6 \n\t"
111 "waddhss wr11, wr1, wr7 \n\t"
112 "waddhss wr12, wr2, wr8 \n\t"
113 "waddhss wr13, wr3, wr9 \n\t"
114 "wpackhus wr14, wr10, wr11 \n\t"
115 "wpackhus wr15, wr12, wr13 \n\t"
116 "wstrd wr14, [%[pixels]] \n\t"
117 "add %[pixels], %[pixels], %[line_size2] \n\t"
118 "subs r12, r12, #1 \n\t"
119 "wstrd wr15, [%[pixels2]] \n\t"
120 "add %[pixels2], %[pixels2], %[line_size2] \n\t"
122 : [
block]
"+r"(
block), [pixels]
"+r"(pixels), [pixels2]
"+r"(pixels2)
123 : [line_size2]
"r"(line_size << 1)
124 :
"cc",
"memory",
"r12");
131 "mov r1, #(128 * 6 / 32) \n\t"
133 "wstrd wr0, [%0] \n\t"
134 "wstrd wr0, [%0, #8] \n\t"
135 "wstrd wr0, [%0, #16] \n\t"
136 "wstrd wr0, [%0, #24] \n\t"
137 "subs r1, r1, #1 \n\t"
138 "add %0, %0, #32 \n\t"
146 static void nop(uint8_t *
block,
const uint8_t *pixels,
int line_size,
int h)
162 mm_flags |= (avctx->
dsp_mask & 0xffff);
164 mm_flags &= ~(avctx->
dsp_mask & 0xffff);
171 if (!high_bit_depth) {
op_pixels_func put_pixels_tab[4][4]
Halfpel motion compensation with rounding (a+b+1)>>1.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
void ff_dsputil_init_iwmmxt(DSPContext *c, AVCodecContext *avctx)
unsigned dsp_mask
dsp_mask could be add used to disable unwanted CPU features CPU features (i.e.
op_pixels_func avg_pixels_tab[4][4]
Halfpel motion compensation with rounding (a+b+1)>>1.
void(* add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size)
op_pixels_func put_no_rnd_pixels_tab[4][4]
Halfpel motion compensation with no rounding (a+b)>>1.
void put_pixels8_y2_iwmmxt(uint8_t *block, const uint8_t *pixels, const int line_size, int h)
void put_no_rnd_pixels8_y2_iwmmxt(uint8_t *block, const uint8_t *pixels, const int line_size, int h)
#define AV_CPU_FLAG_IWMMXT
XScale IWMMXT.
op_pixels_func avg_no_rnd_pixels_tab[4][4]
Halfpel motion compensation with no rounding (a+b)>>1.
#define AV_CPU_FLAG_FORCE
main external API structure.
void(* clear_blocks)(DCTELEM *blocks)
static void clear_blocks_iwmmxt(DCTELEM *blocks)
static void nop(uint8_t *block, const uint8_t *pixels, int line_size, int h)
void add_pixels_clamped_iwmmxt(const DCTELEM *block, uint8_t *pixels, int line_size)