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

AFTEN_API void aften_set_defaults ( AftenContext s  ) 

Sets the parameters for an encoding context to their default values.

Parameters:
s The encoding context

These 5 must be set explicitly before initialization. There are utility functions to help setting acmod and lfe.

Definition at line 165 of file a52enc.c.

References AftenContext::acmod, AftenMetadata::adconvtyp, AftenSystemParams::available_simd_instructions, AftenStatus::bit_rate, AftenEncParams::bitalloc_fast, AftenEncParams::bitrate, AftenStatus::bwcode, AftenEncParams::bwcode, AftenContext::channels, AftenMetadata::cmixlev, AftenMetadata::dheadphonmod, AftenMetadata::dialnorm, AftenMetadata::dmixmod, AftenMetadata::dsurexmod, AftenMetadata::dsurmod, AftenEncParams::dynrng_profile, AftenEncParams::encoding_mode, AftenEncParams::expstr_search, AftenContext::initial_samples, AftenContext::lfe, AftenMetadata::lorocmixlev, AftenMetadata::lorosmixlev, AftenMetadata::ltrtcmixlev, AftenMetadata::ltrtsmixlev, AftenEncParams::max_bwcode, AftenContext::meta, AftenEncParams::min_bwcode, AftenContext::mode, AftenSystemParams::n_threads, AftenContext::params, AftenContext::private_context, AftenStatus::quality, AftenEncParams::quality, AftenContext::sample_format, AftenContext::samplerate, AftenContext::status, AftenMetadata::surmixlev, AftenContext::system, AftenEncParams::use_block_switching, AftenEncParams::use_bw_filter, AftenEncParams::use_dc_filter, AftenEncParams::use_lfe_filter, AftenEncParams::use_rematrixing, AftenContext::verbose, AftenSystemParams::wanted_simd_instructions, AftenMetadata::xbsi1e, and AftenMetadata::xbsi2e.

{
    if (s == NULL) {
        fprintf(stderr, "NULL parameter passed to aften_set_defaults\n");
        return;
    }


    /**
     * These 5 must be set explicitly before initialization.
     * There are utility functions to help setting acmod and lfe.
     */

    /* Tell the context which SIMD instruction sets are available. */
    set_available_simd_instructions(&s->system.available_simd_instructions);
    s->system.wanted_simd_instructions = s->system.available_simd_instructions;
    s->system.n_threads = 0;

    s->verbose = 1;
    s->channels = -1;
    s->samplerate = -1;
    s->acmod = -1;
    s->lfe = -1;
    s->mode = AFTEN_ENCODE;

    s->sample_format = A52_SAMPLE_FMT_S16;
    s->private_context = NULL;
    s->params.encoding_mode = AFTEN_ENC_MODE_CBR;
    s->params.bitrate = 0;
    s->params.quality = 240;
    s->params.bwcode = -1;
    s->params.use_rematrixing = 1;
    s->params.use_block_switching = 0;
    s->params.use_bw_filter = 0;
    s->params.use_dc_filter = 0;
    s->params.use_lfe_filter = 0;
    s->params.bitalloc_fast = 0;
    s->params.expstr_search = 8;
    s->params.dynrng_profile = DYNRNG_PROFILE_NONE;
    s->params.min_bwcode = 0;
    s->params.max_bwcode = 60;

    s->meta.cmixlev = 0;
    s->meta.surmixlev = 0;
    s->meta.dsurmod = 0;
    s->meta.dialnorm = 31;
    s->meta.xbsi1e = 0;
    s->meta.dmixmod = 0;
    s->meta.ltrtcmixlev = 4;
    s->meta.ltrtsmixlev = 4;
    s->meta.lorocmixlev = 4;
    s->meta.lorosmixlev = 4;
    s->meta.xbsi2e = 0;
    s->meta.dsurexmod = 0;
    s->meta.dheadphonmod = 0;
    s->meta.adconvtyp = 0;

    s->status.quality = 0;
    s->status.bit_rate = 0;
    s->status.bwcode = 0;

    s->initial_samples = NULL;
}


Generated by  Doxygen 1.6.0   Back to index