mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
clear_blocks_mmi() optimization by BroadQ (and patch by Leon van Stuivenberg <leonvs at iae dot nl>)
Originally committed as revision 1691 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a05c8d7177
commit
5031c5b47b
@ -17,6 +17,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* MMI optimization by Leon van Stuivenberg <leonvs@iae.nl>
|
* MMI optimization by Leon van Stuivenberg <leonvs@iae.nl>
|
||||||
|
* clear_blocks_mmi() by BroadQ
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../dsputil.h"
|
#include "../dsputil.h"
|
||||||
@ -28,19 +29,21 @@ void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block);
|
|||||||
|
|
||||||
static void clear_blocks_mmi(DCTELEM * blocks)
|
static void clear_blocks_mmi(DCTELEM * blocks)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
for (i = 0; i < 6; i++) {
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
"sq $0, 0(%0) \n\t"
|
".set noreorder \n"
|
||||||
"sq $0, 16(%0) \n\t"
|
"addiu $9, %0, 768 \n"
|
||||||
"sq $0, 32(%0) \n\t"
|
"nop \n"
|
||||||
"sq $0, 48(%0) \n\t"
|
"1: \n"
|
||||||
"sq $0, 64(%0) \n\t"
|
"sq $0, 0(%0) \n"
|
||||||
"sq $0, 80(%0) \n\t"
|
"move $8, %0 \n"
|
||||||
"sq $0, 96(%0) \n\t"
|
"addi %0, %0, 64 \n"
|
||||||
"sq $0, 112(%0) \n\t" :: "r" (blocks) : "memory" );
|
"sq $0, 16($8) \n"
|
||||||
blocks += 64;
|
"slt $10, %0, $9 \n"
|
||||||
}
|
"sq $0, 32($8) \n"
|
||||||
|
"bnez $10, 1b \n"
|
||||||
|
"sq $0, 48($8) \n"
|
||||||
|
".set reorder \n"
|
||||||
|
: "+r" (blocks) :: "$8", "$9", "memory" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user