25 #include "libavutil/attributes.h"
26 #include "libavutil/cpu.h"
27 #include "libavutil/mem.h"
53 register int misal = ((
unsigned long)blocks & 0x00000010);
56 ((
unsigned long*)blocks)[0] = 0
L;
57 ((
unsigned long*)blocks)[1] = 0
L;
58 ((
unsigned long*)blocks)[2] = 0
L;
59 ((
unsigned long*)blocks)[3] = 0
L;
62 for ( ; i <
sizeof(int16_t)*6*64-31 ; i += 32) {
63 __asm__
volatile(
"dcbz %0,%1" : :
"b" (blocks),
"r" (i) :
"memory");
66 ((
unsigned long*)blocks)[188] = 0
L;
67 ((
unsigned long*)blocks)[189] = 0
L;
68 ((
unsigned long*)blocks)[190] = 0
L;
69 ((
unsigned long*)blocks)[191] = 0
L;
79 register int misal = ((
unsigned long)blocks & 0x0000007f);
85 memset(blocks, 0,
sizeof(int16_t)*6*64);
88 for ( ; i <
sizeof(int16_t)*6*64 ; i += 128) {
89 __asm__
volatile(
"dcbzl %0,%1" : :
"b" (blocks),
"r" (i) :
"memory");
95 memset(blocks, 0,
sizeof(int16_t)*6*64);
107 register char *fakedata =
av_malloc(1024);
108 register char *fakedata_middle;
109 register long zero = 0;
117 fakedata_middle = (fakedata + 512);
119 memset(fakedata, 0xFF, 1024);
123 __asm__
volatile(
"dcbzl %0, %1" : :
"b" (fakedata_middle),
"r" (zero));
125 for (i = 0; i < 1024 ; i ++) {
126 if (fakedata[i] == (
char)0)
147 if (!high_bit_depth) {
171 #endif //CONFIG_ENCODERS
int dct_algo
DCT algorithm, see FF_DCT_* below.
static long check_dcbzl_effect(void)
void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx)
void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
static void clear_blocks_dcbz128_ppc(int16_t *blocks)
void(* idct_add)(uint8_t *dest, int line_size, int16_t *block)
block -> idct -> add dest -> clip to unsigned 8 bit -> dest.
void(* idct_put)(uint8_t *dest, int line_size, int16_t *block)
block -> idct -> clip to unsigned 8 bit -> dest.
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
av_cold void ff_dsputil_init_altivec(DSPContext *c, AVCodecContext *avctx)
void(* clear_blocks)(int16_t *blocks)
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static void clear_blocks_dcbz32_ppc(int16_t *blocks)
int idct_permutation_type
main external API structure.
void(* gmc1)(uint8_t *dst, uint8_t *src, int srcStride, int h, int x16, int y16, int rounder)
translational global motion compensation.
void ff_int_init_altivec(DSPContext *c, AVCodecContext *avctx)
void ff_fdct_altivec(int16_t *block)
void(* fdct)(int16_t *block)
void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block)
#define FF_TRANSPOSE_IDCT_PERM
void ff_gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y16, int rounder)
#define PPC_ALTIVEC(flags)