|
|
|
@ -22,6 +22,7 @@ |
|
|
|
|
|
|
|
|
|
#include "../dsputil.h" |
|
|
|
|
#include "../simple_idct.h" |
|
|
|
|
#include "mmx.h" |
|
|
|
|
|
|
|
|
|
//#undef NDEBUG
|
|
|
|
|
//#include <assert.h>
|
|
|
|
@ -293,6 +294,23 @@ void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size |
|
|
|
|
:"memory"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size) |
|
|
|
|
{ |
|
|
|
|
int i; |
|
|
|
|
unsigned char __align8 vector128[8] = |
|
|
|
|
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; |
|
|
|
|
|
|
|
|
|
movq_m2r(*vector128, mm1); |
|
|
|
|
for (i = 0; i < 8; i++) { |
|
|
|
|
movq_m2r(*(block), mm0); |
|
|
|
|
packsswb_m2r(*(block + 4), mm0); |
|
|
|
|
block += 8; |
|
|
|
|
paddb_r2r(mm1, mm0); |
|
|
|
|
movq_r2m(mm0, *pixels); |
|
|
|
|
pixels += line_size; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size) |
|
|
|
|
{ |
|
|
|
|
const DCTELEM *p; |
|
|
|
@ -2160,6 +2178,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
|
|
|
|
c->diff_pixels = diff_pixels_mmx; |
|
|
|
|
#endif //CONFIG_ENCODERS
|
|
|
|
|
c->put_pixels_clamped = put_pixels_clamped_mmx; |
|
|
|
|
c->put_signed_pixels_clamped = put_signed_pixels_clamped_mmx; |
|
|
|
|
c->add_pixels_clamped = add_pixels_clamped_mmx; |
|
|
|
|
c->clear_blocks = clear_blocks_mmx; |
|
|
|
|
#ifdef CONFIG_ENCODERS |
|
|
|
|