Ignore:
Timestamp:
Aug 1, 2009 9:20:59 AM (15 years ago)
Author:
bennylp
Message:

Initial commit for ticket #929: Improve packet lost concealment (PLC) when handling burst of lost packets

WSOLA improvements:

  • Introduce fade-out and fade-in effect
  • Limit the number of continuous synthetic samples (only take effect when fading is used)
  • Export many settings as macros:
    • PJMEDIA_WSOLA_DELAY_MSEC (was HANNING_PTIME)
    • PJMEDIA_WSOLA_TEMPLATE_LENGTH_MSEC (was TEMPLATE_PTIME)
    • PJMEDIA_WSOLA_MAX_EXPAND_MSEC

PLC:

  • added compile time macro PJMEDIA_WSOLA_PLC_NO_FADING to disable fading (default enabled)

Stream:

  • fixed bug when stream is not PLC-ing subsequent packet loss (only the first)
  • also add maximum PLC limit just as precaution if PLC doesn't limit number of synthetic frames
  • unrelated: fixed warning about unused send_keep_alive() function

Delaybuf:

  • modified to NOT use fading in WSOLA since we don't expect it to generate many continuous synthetic frames
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/wsola.h

    r2394 r2850  
    7070     * non-contiguous buffer. 
    7171     */ 
    72     PJMEDIA_WSOLA_NO_DISCARD = 4 
     72    PJMEDIA_WSOLA_NO_DISCARD = 4, 
     73 
     74    /** 
     75     * Disable fade-in and fade-out feature in the transition between 
     76     * actual and synthetic frames in WSOLA. With fade feature enabled,  
     77     * WSOLA will only generate a limited number of synthetic frames  
     78     * (configurable with #pjmedia_wsola_set_max_expand()), fading out  
     79     * the volume on every more samples it generates, and when it reaches 
     80     * the limit it will only generate silence. 
     81     */ 
     82    PJMEDIA_WSOLA_NO_FADING = 8 
    7383}; 
    7484 
     
    94104                                          unsigned options, 
    95105                                          pjmedia_wsola **p_wsola); 
     106 
     107 
     108/** 
     109 * Specify maximum number of continuous synthetic frames that can be 
     110 * generated by WSOLA, in milliseconds. This option will only take 
     111 * effect if fading is not disabled via the option when the WSOLA 
     112 * session was created. Default value is PJMEDIA_WSOLA_MAX_EXPAND_MSEC 
     113 * (see also the documentation of PJMEDIA_WSOLA_MAX_EXPAND_MSEC for 
     114 * more information). 
     115 * 
     116 * @param wsola     The WSOLA session 
     117 * @param msec      The duration. 
     118 * 
     119 * @return          PJ_SUCCESS normally. 
     120 */ 
     121PJ_DECL(pj_status_t) pjmedia_wsola_set_max_expand(pjmedia_wsola *wsola, 
     122                                                  unsigned msec); 
    96123 
    97124 
Note: See TracChangeset for help on using the changeset viewer.