#include "avcodec.h"#include "ra144.h"

Go to the source code of this file.
Data Structures | |
| struct | Real144_internal |
Defines | |
| #define | DATABLOCK1 20 |
| #define | DATACHUNK1 1440 |
| #define | AUDIOBLOCK 160 |
| #define | AUDIOBUFFER 12288 |
| #define | NBLOCKS 4 |
| #define | BLOCKSIZE 40 |
| #define | HALFBLOCK 20 |
| #define | BUFFERSIZE 146 |
Functions | |
| static int | ra144_decode_init (AVCodecContext *avctx) |
| static void | final (Real144_internal *glob, short *i1, short *i2, void *out, int *statbuf, int len) |
| static void | add_wav (Real144_internal *glob, int n, int f, int m1, int m2, int m3, short *s1, short *s2, short *s3, short *dest) |
| static int | irms (short *data, int factor) |
| static void | rotate_block (short *source, short *target, int offset) |
| static int | t_sqrt (unsigned int x) |
| static void | do_voice (int *a1, int *a2) |
| static void | do_output_subblock (Real144_internal *glob, unsigned int x) |
| static void | unpack_input (unsigned char *input, unsigned int *output) |
| static unsigned int | rms (int *data, int f) |
| static void | dec1 (Real144_internal *glob, int *data, int *inp, int n, int f) |
| static int | eq (Real144_internal *glob, short *in, int *target) |
| static void | dec2 (Real144_internal *glob, int *data, int *inp, int n, int f, int *inp2, int l) |
| static int | ra144_decode_frame (AVCodecContext *avctx, void *vdata, int *data_size, uint8_t *buf, int buf_size) |
Variables | |
| AVCodec | ra_144_decoder |
| #define BLOCKSIZE 40 |
Definition at line 29 of file ra144.c.
Referenced by add_wav(), do_output_subblock(), irms(), ra144_decode_frame(), and rotate_block().
| #define HALFBLOCK 20 |
| #define NBLOCKS 4 |
| static void add_wav | ( | Real144_internal * | glob, | |
| int | n, | |||
| int | f, | |||
| int | m1, | |||
| int | m2, | |||
| int | m3, | |||
| short * | s1, | |||
| short * | s2, | |||
| short * | s3, | |||
| short * | dest | |||
| ) | [static] |
Definition at line 185 of file ra144.c.
References a, b, BLOCKSIZE, c, Real144_internal::wavtable1, and Real144_internal::wavtable2.
Referenced by do_output_subblock().
| static void dec1 | ( | Real144_internal * | glob, | |
| int * | data, | |||
| int * | inp, | |||
| int | n, | |||
| int | f | |||
| ) | [static] |
Definition at line 340 of file ra144.c.
References Real144_internal::decptr, Real144_internal::decsp, and rms().
Referenced by dec2(), and ra144_decode_frame().

| static void dec2 | ( | Real144_internal * | glob, | |
| int * | data, | |||
| int * | inp, | |||
| int | n, | |||
| int | f, | |||
| int * | inp2, | |||
| int | l | |||
| ) | [static] |
Definition at line 394 of file ra144.c.
References a, b, dec1(), Real144_internal::decptr, Real144_internal::decsp, eq(), Real144_internal::gbuf1, Real144_internal::gbuf2, NBLOCKS, rms(), and Real144_internal::sptr.
Referenced by ra144_decode_frame().

| static void do_output_subblock | ( | Real144_internal * | glob, | |
| unsigned int | x | |||
| ) | [static] |
Definition at line 133 of file ra144.c.
References a, add_wav(), b, BLOCKSIZE, Real144_internal::buffer, Real144_internal::buffer_2, Real144_internal::buffer_a, Real144_internal::buffer_b, Real144_internal::buffer_c, Real144_internal::buffer_d, BUFFERSIZE, c, e, etable1, etable2, ftable1, ftable2, Real144_internal::gsp, Real144_internal::gval, HALFBLOCK, Real144_internal::iptr, irms(), memcpy, Real144_internal::output_buffer, and rotate_block().
Referenced by ra144_decode_frame().

| static void do_voice | ( | int * | a1, | |
| int * | a2 | |||
| ) | [static] |
| static int eq | ( | Real144_internal * | glob, | |
| short * | in, | |||
| int * | target | |||
| ) | [static] |
Definition at line 350 of file ra144.c.
References a, b, Real144_internal::buffer1, Real144_internal::buffer2, and c.
Referenced by dec2().
| static void final | ( | Real144_internal * | glob, | |
| short * | i1, | |||
| short * | i2, | |||
| void * | out, | |||
| int * | statbuf, | |||
| int | len | |||
| ) | [static] |
| static int irms | ( | short * | data, | |
| int | factor | |||
| ) | [static] |
Definition at line 174 of file ra144.c.
References BLOCKSIZE, and t_sqrt().
Referenced by do_output_subblock().

| static int ra144_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | vdata, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 426 of file ra144.c.
References a, b, BLOCKSIZE, c, dec1(), dec2(), decodetable, do_output_subblock(), do_voice(), Real144_internal::gbuf1, Real144_internal::gbuf2, Real144_internal::gsp, Real144_internal::gval, Real144_internal::iptr, NBLOCKS, Real144_internal::oldval, Real144_internal::output_buffer, AVCodecContext::priv_data, Real144_internal::resetflag, s, Real144_internal::swapbuf1, Real144_internal::swapbuf1alt, Real144_internal::swapbuf2, Real144_internal::swapbuf2alt, t_sqrt(), unpack_input(), Real144_internal::unpacked, and Real144_internal::val.

| static int ra144_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 74 of file ra144.c.
References memcpy, AVCodecContext::priv_data, Real144_internal::resetflag, Real144_internal::swapb1a, Real144_internal::swapb1b, Real144_internal::swapb2a, Real144_internal::swapb2b, Real144_internal::swapbuf1, Real144_internal::swapbuf1alt, Real144_internal::swapbuf2, Real144_internal::swapbuf2alt, wavtable1, Real144_internal::wavtable1, wavtable2, and Real144_internal::wavtable2.
| static unsigned int rms | ( | int * | data, | |
| int | f | |||
| ) | [static] |
| static void rotate_block | ( | short * | source, | |
| short * | target, | |||
| int | offset | |||
| ) | [static] |
Definition at line 158 of file ra144.c.
References BLOCKSIZE, and BUFFERSIZE.
Referenced by do_output_subblock().
| static int t_sqrt | ( | unsigned int | x | ) | [static] |
Definition at line 96 of file ra144.c.
References s, and sqrt_table.
Referenced by irms(), ra144_decode_frame(), and rms().
| static void unpack_input | ( | unsigned char * | input, | |
| unsigned int * | output | |||
| ) | [static] |
Initial value:
{
"real_144",
CODEC_TYPE_AUDIO,
CODEC_ID_RA_144,
sizeof(Real144_internal),
ra144_decode_init,
NULL,
NULL,
ra144_decode_frame,
}
Definition at line 507 of file ra144.c.
Referenced by avcodec_register_all().
1.5.5