Changeset 37 for libmpcdec/trunk/include


Ignore:
Timestamp:
09/22/06 22:00:44 (18 years ago)
Author:
zorg
Message:

Added optional fast seeking, seek table index & various code cleanup. Patch by Nicolas BOTTI

Location:
libmpcdec/trunk/include/mpcdec
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libmpcdec/trunk/include/mpcdec/decoder.h

    r10 r37  
    4646#define MPC_SUPPORT_SV456
    4747
     48#define SEEKING_TABLE_SIZE  256
     49// set it to SLOW_SEEKING_WINDOW to not use fast seeking
     50#define FAST_SEEKING_WINDOW 32
     51// set it to FAST_SEEKING_WINDOW to only use fast seeking
     52#define SLOW_SEEKING_WINDOW 0x80000000
     53
    4854enum {
    4955    MPC_V_MEM = 2304,
     
    6975    mpc_uint32_t  samples_to_skip;
    7076
    71     mpc_uint32_t  FwdJumpInfo;
    72     mpc_uint32_t  ActDecodePos;
    73    
    74 
    7577    mpc_uint32_t  DecodedFrames;
    7678    mpc_uint32_t  OverallFrames;
     
    9193    mpc_uint32_t  __r2;
    9294
     95    // seeking
     96    mpc_uint32_t  seeking_table[SEEKING_TABLE_SIZE];
     97    mpc_uint32_t  seeking_pwr;                // distance between 2 frames in seeking_table = 2^seeking_pwr
     98    mpc_uint32_t  seeking_table_frames;       // last frame in seaking table
     99    mpc_uint32_t  seeking_window;             // number of frames to look for scalefactors
     100
    93101    mpc_int32_t   SCF_Index_L [32] [3];
    94102    mpc_int32_t   SCF_Index_R [32] [3];       // holds scalefactor-indices
     
    100108    mpc_int32_t   SCFI_L [32];
    101109    mpc_int32_t   SCFI_R [32];                // describes order of transmitted SCF
    102     mpc_int32_t   DSCF_Reference_L [32];
    103     mpc_int32_t   DSCF_Reference_R [32];      // holds last frames SCF
    104110    mpc_bool_t    MS_Flag[32];                // MS used?
    105111#ifdef MPC_FIXED_POINT
  • libmpcdec/trunk/include/mpcdec/mpcdec.h

    r6 r37  
    101101mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si);
    102102
     103/// Call this next after calling mpc_decoder_setup.
     104/// \param si streaminfo structure indicating format of source stream
     105/// \param fast_seeking boolean 0 = use fast seeking if safe, 1 = force fast seeking
     106void mpc_decoder_set_seeking(mpc_decoder *d, mpc_streaminfo *si, mpc_bool_t fast_seeking);
     107
    103108void mpc_decoder_set_streaminfo(mpc_decoder *d, mpc_streaminfo *si);
    104109
  • libmpcdec/trunk/include/mpcdec/streaminfo.h

    r6 r37  
    8282    mpc_streaminfo_off_t total_file_length;  ///< total length of underlying file
    8383    //@}
     84
     85    /// @name fast seeking support
     86    //@{
     87    mpc_uint32_t        fast_seek;           ///< support fast seeking ? (0: no, 1: yes)
     88    //@}
    8489} mpc_streaminfo;
    8590
Note: See TracChangeset for help on using the changeset viewer.