Go to the documentation of this file.
37 #ifndef AVCODEC_AACCODER_TRELLIS_H
38 #define AVCODEC_AACCODER_TRELLIS_H
60 int win,
int group_len,
const float lambda)
67 const int run_esc = (1 <<
run_bits) - 1;
69 int stackrun[120], stackcb[120], stack_len;
73 s->abs_pow34(
s->scoefs, sce->
coeffs, 1024);
80 for (swb = 0; swb < max_sfb; swb++) {
83 float cost_stay_here = path[swb][0].
cost;
84 float cost_get_here = next_minbits +
run_bits + 4;
88 if (cost_get_here < cost_stay_here) {
89 path[swb+1][0].
prev_idx = next_mincb;
90 path[swb+1][0].
cost = cost_get_here;
91 path[swb+1][0].
run = 1;
94 path[swb+1][0].
cost = cost_stay_here;
95 path[swb+1][0].
run = path[swb][0].
run + 1;
97 next_minbits = path[swb+1][0].
cost;
100 path[swb+1][
cb].
cost = 61450;
102 path[swb+1][
cb].
run = 0;
105 float minbits = next_minbits;
106 int mincb = next_mincb;
111 for (
cb = 0;
cb < startcb;
cb++) {
112 path[swb+1][
cb].
cost = 61450;
114 path[swb+1][
cb].
run = 0;
117 float cost_stay_here, cost_get_here;
120 path[swb+1][
cb].
cost = 61450;
122 path[swb+1][
cb].
run = 0;
125 for (
w = 0;
w < group_len;
w++) {
127 &
s->scoefs[start +
w*128],
size,
137 if (cost_get_here < cost_stay_here) {
139 path[swb+1][
cb].
cost = cost_get_here;
140 path[swb+1][
cb].
run = 1;
143 path[swb+1][
cb].
cost = cost_stay_here;
146 if (path[swb+1][
cb].cost < next_minbits) {
147 next_minbits = path[swb+1][
cb].
cost;
159 if (path[max_sfb][
cb].cost < path[max_sfb][idx].cost)
165 stackrun[stack_len] = path[ppos][
cb].
run;
166 stackcb [stack_len] =
cb;
168 ppos -= path[ppos][
cb].
run;
173 for (
i = stack_len - 1;
i >= 0;
i--) {
179 for (j = 0; j < count; j++) {
183 while (count >= run_esc) {
static double cb(void *priv, double x, double y)
#define CB_TOT_ALL
Total number of codebooks, including special ones.
uint8_t zeroes[128]
band is not coded (used by encoder)
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
static float win(SuperEqualizerContext *s, float n, int N)
static int quantize_band_cost_bits(struct AACEncContext *s, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, float *energy, int rtz)
IndividualChannelStream ics
INTFLOAT coeffs[1024]
coefficients for IMDCT, maybe processed
const uint8_t * swb_sizes
table of scalefactor band sizes for a particular window
static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce, int win, int group_len, const float lambda)
static const uint8_t *const run_value_bits[2]
int sf_idx[128]
scalefactor indices (used by encoder)
static const uint8_t aac_cb_out_map[CB_TOT_ALL]
Map to convert values from BandCodingPath index to a codebook index.
This file contains a template for the codebook_trellis_rate selector function.
static const uint8_t run_bits[7][16]
Single Channel Element - used for both SCE and LFE elements.
#define i(width, name, range_min, range_max)
static const uint8_t aac_cb_in_map[CB_TOT_ALL+1]
Inverse map to convert from codebooks to BandCodingPath indices.
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo ug o o w
int prev_idx
pointer to the previous path point
uint8_t max_sfb
number of scalefactor bands per group
enum BandType band_type[128]
band types