Logo Search packages:      
Sourcecode: aften version File versions  Download package

a52enc.c File Reference

Detailed Description

Aften: A/52 audio encoder Copyright (c) 2006 Justin Ruggles 2007 Prakash Punnoor <prakash@punnoor.de>

Based on "The simplest AC3 encoder" from FFmpeg Copyright (c) 2000 Fabrice Bellard.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

A/52 encoder

Definition in file a52enc.c.

#include "a52enc.h"
#include "bitalloc.h"
#include "crc.h"
#include "window.h"
#include "dynrng.h"
#include "cpu_caps.h"
#include "convert.h"

Go to the source code of this file.


#define SWAP_BUFFERS   temp=in_audio;in_audio=out_audio;out_audio=temp;
#define sym_quant(c, e, levels)   ((((((levels) * (c)) >> (24-(e))) + 1) >> 1) + ((levels) >> 1))


static void adjust_frame_size (A52ThreadContext *tctx)
int aften_encode_close (AftenContext *s)
int aften_encode_frame (AftenContext *s, uint8_t *frame_buffer, const void *samples, int count)
int aften_encode_init (AftenContext *s)
const char * aften_get_version (void)
void aften_set_defaults (AftenContext *s)
static int asym_quant (int c, int e, int qbits)
static int begin_encode_frame (A52ThreadContext *tctx)
static int begin_transcode_frame (A52ThreadContext *tctx)
static void calc_rematrixing (A52ThreadContext *tctx)
static void calculate_dynrng (A52ThreadContext *tctx)
static void compute_dither_strategy (A52ThreadContext *tctx)
static int convert_samples_from_src (A52ThreadContext *tctx, const void *vsrc, int count)
static void copy_samples (A52ThreadContext *tctx)
static int detect_transient (FLOAT *in)
static int frame_init (A52ThreadContext *tctx)
static void generate_coefs (A52ThreadContext *tctx)
static void output_audio_blocks (A52ThreadContext *tctx)
static int output_frame_end (A52ThreadContext *tctx)
static void output_frame_header (A52ThreadContext *tctx, uint8_t *frame_buffer)
static int prepare_transcode_common (A52ThreadContext *tctx, const void *input_frame_buffer, int input_frame_buffer_size, int *want_bytes)
static int process_frame (A52ThreadContext *tctx, uint8_t *output_frame_buffer)
static void quant_mant_ch (FLOAT *mdct_coef, uint8_t *exp, uint8_t *bap, uint16_t *qmant, int ncoefs, uint16_t *qmant_ptr[3], int mant_cnt[3])
static void quantize_mantissas (A52ThreadContext *tctx)
static void set_available_simd_instructions (AftenSimdInstructions *simd_instructions)


int nexpgrptab [3][256] = {{0}}
static const uint8_t rematbndtab [5] = { 13, 25, 37, 61, 252 }

Generated by  Doxygen 1.6.0   Back to index