Commit 1768e43c authored by Ronald S. Bultje's avatar Ronald S. Bultje

vorbisdsp: change block_size type from int to intptr_t.

This saves one instruction in the x86-64 assembly.
parent 93af2734
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include "libavutil/arm/cpu.h" #include "libavutil/arm/cpu.h"
#include "libavcodec/vorbisdsp.h" #include "libavcodec/vorbisdsp.h"
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize); void ff_vorbis_inverse_coupling_neon(float *mag, float *ang,
intptr_t blocksize);
void ff_vorbisdsp_init_arm(VorbisDSPContext *c) void ff_vorbisdsp_init_arm(VorbisDSPContext *c)
{ {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#if HAVE_ALTIVEC #if HAVE_ALTIVEC
static void vorbis_inverse_coupling_altivec(float *mag, float *ang, static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
int blocksize) intptr_t blocksize)
{ {
int i; int i;
vector float m, a; vector float m, a;
......
...@@ -43,7 +43,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num); ...@@ -43,7 +43,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num);
void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values, void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,
uint16_t *y_list, int *flag, uint16_t *y_list, int *flag,
int multiplier, float * out, int samples); int multiplier, float * out, int samples);
void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize); void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize);
#define ilog(i) av_log2(2*(i)) #define ilog(i) av_log2(2*(i))
......
...@@ -1450,7 +1450,7 @@ static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, ...@@ -1450,7 +1450,7 @@ static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr,
} }
} }
void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize) void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize)
{ {
int i; int i;
for (i = 0; i < blocksize; i++) { for (i = 0; i < blocksize; i++) {
......
...@@ -19,9 +19,12 @@ ...@@ -19,9 +19,12 @@
#ifndef AVCODEC_VORBISDSP_H #ifndef AVCODEC_VORBISDSP_H
#define AVCODEC_VORBISDSP_H #define AVCODEC_VORBISDSP_H
#include <stdint.h>
typedef struct VorbisDSPContext { typedef struct VorbisDSPContext {
/* assume len is a multiple of 4, and arrays are 16-byte aligned */ /* assume len is a multiple of 4, and arrays are 16-byte aligned */
void (*vorbis_inverse_coupling)(float *mag, float *ang, int blocksize); void (*vorbis_inverse_coupling)(float *mag, float *ang,
intptr_t blocksize);
} VorbisDSPContext; } VorbisDSPContext;
void ff_vorbisdsp_init(VorbisDSPContext *dsp); void ff_vorbisdsp_init(VorbisDSPContext *dsp);
......
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
#if HAVE_INLINE_ASM #if HAVE_INLINE_ASM
#if ARCH_X86_32 #if ARCH_X86_32
static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize) static void vorbis_inverse_coupling_3dnow(float *mag, float *ang,
intptr_t blocksize)
{ {
int i; int i;
__asm__ volatile ("pxor %%mm7, %%mm7":); __asm__ volatile ("pxor %%mm7, %%mm7":);
...@@ -54,7 +55,8 @@ static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize) ...@@ -54,7 +55,8 @@ static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize)
} }
#endif #endif
static void vorbis_inverse_coupling_sse(float *mag, float *ang, int blocksize) static void vorbis_inverse_coupling_sse(float *mag, float *ang,
intptr_t blocksize)
{ {
int i; int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment