FFmpeg
|
Reference: libavcodec/mpegaudiodsp_template.c. More...
Go to the source code of this file.
Functions | |
static void | ff_mpadsp_apply_window_mips_fixed (int32_t *synth_buf, int32_t *window, int *dither_state, int16_t *samples, int incr) |
static void | imdct36_mips_fixed (int *out, int *buf, int *in, int *win) |
static void | ff_imdct36_blocks_mips_fixed (int *out, int *buf, int *in, int count, int switch_point, int block_type) |
void | ff_mpadsp_init_mipsdsp (MPADSPContext *s) |
Reference: libavcodec/mpegaudiodsp_template.c.
Definition in file mpegaudiodsp_mips_fixed.c.
|
static |
use of round_sample function from the original code is eliminated, changed with appropriate assembly instructions.
Definition at line 60 of file mpegaudiodsp_mips_fixed.c.
Referenced by ff_mpadsp_init_mipsdsp().
|
static |
Original constants are multiplied by two in advanced for assembly optimization (e.g. C_2 = 2 * C2). That can lead to overflow in operations where they are used.
Example of the solution:
in original code: t0 = ((int64_t)(in1[2*2] + in1[2*4]) * (int64_t)(2*C2))>>32
in assembly: C_2 = 2 * C2;"lw %[t7], 4*4(%[in1]) \n\t" "lw %[t8], 8*4(%[in1]) \n\t" "addu %[temp_reg2],%[t7], %[t8] \n\t" "multu %[C_2], %[temp_reg2] \n\t" "mfhi %[temp_reg1] \n\t" "sra %[temp_reg2],%[temp_reg2],31 \n\t" "move %[t0], $0 \n\t" "movn %[t0], %[C_2], %[temp_reg2] \n\t" "sub %[t0], %[temp_reg1],%[t0] \n\t"
loop is unrolled four times
values defined in tables(icos36[] and icos36h[]) are not loaded from these tables - they are directly loaded in appropriate registers
Definition at line 350 of file mpegaudiodsp_mips_fixed.c.
Referenced by ff_imdct36_blocks_mips_fixed().
|
static |
Definition at line 885 of file mpegaudiodsp_mips_fixed.c.
Referenced by ff_mpadsp_init_mipsdsp().
void ff_mpadsp_init_mipsdsp | ( | MPADSPContext * | s | ) |
Definition at line 904 of file mpegaudiodsp_mips_fixed.c.
Referenced by ff_mpadsp_init().