diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2001-08-12 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2001-08-12 18:00:00 +0200 |
commit | efea0f64d08052b0189d962101e1a3634d4adfc8 (patch) | |
tree | a3feff7ccf6874da549b25ea3b671d15a65d0e3d /ac3dec/exponent.c | |
parent | f1d1c9849c8e27cccb46cf9c0d0ccb59da3f91f9 (diff) | |
download | vdr-patch-lnbsharing-efea0f64d08052b0189d962101e1a3634d4adfc8.tar.gz vdr-patch-lnbsharing-efea0f64d08052b0189d962101e1a3634d4adfc8.tar.bz2 |
Version 0.91vdr-0.91
- Fixed displaying colored button texts that are too long.
- Suppressing replay progress display when replaying a DVD.
- Updated channels.conf.cable (thanks to Uwe Scheffler).
- Updated French OSD texts (thanks to Jean-Claude Repetto).
- Improved AC3 decoding when replaying DVDs (thanks to Matjaz Thaler).
- Fixed handling DVB card indexes when using only one card in a multi-card
system.
- Changed the 'Eject DVD' button text to a simple 'Eject' (the German text
was too long...).
- Made the font file generation more stable (thanks to Artur Skawina).
- Changed the default value for the "DiSEqC" setup parameter to "off".
- The new command line option '-E' can be used to define where the EPG data
shall be written to. This is especially useful if VDR runs in a system
that turns off the video disk when it is not used, and therefore needs
to write the EPG file to a ramdisk (or turn off writing it alltogether).
See 'vdr --help' for details.
- Making sure the disk is up and running before starting recording (this
is important for systems that turn off the video disk when it is not used).
- Added the "Jump" function in replay mode (thanks to Stefan Huelswitt).
See the description of the "Red" key in MANUAL under "Replay Control" for
details.
- Fixed displaying editing marks when toggling a mark in "pause" mode.
- If there is no free DVB device to record, the log message will now be given
only once.
- Made I/O more robust by handling EINTR (thanks to Werner Fink).
Diffstat (limited to 'ac3dec/exponent.c')
-rw-r--r-- | ac3dec/exponent.c | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/ac3dec/exponent.c b/ac3dec/exponent.c index 98111a5..16fca46 100644 --- a/ac3dec/exponent.c +++ b/ac3dec/exponent.c @@ -28,41 +28,43 @@ #include "ac3_internal.h" -#include "decode.h" #include "exponent.h" -static void exp_unpack_ch(uint_16 type,uint_16 expstr,uint_16 ngrps,uint_16 initial_exp, - uint_16 exps[], uint_16 *dest); +static inline void exp_unpack_ch(uint16_t type,uint16_t expstr,uint16_t ngrps,uint16_t initial_exp, uint16_t exps[], uint16_t *dest); -void -exponent_unpack( bsi_t *bsi, audblk_t *audblk) + +/** + * + **/ + +void exponent_unpack( bsi_t *bsi, audblk_t *audblk) { - uint_16 i; + uint16_t i; for(i=0; i< bsi->nfchans; i++) - exp_unpack_ch(UNPACK_FBW, audblk->chexpstr[i], audblk->nchgrps[i], audblk->exps[i][0], - &audblk->exps[i][1], audblk->fbw_exp[i]); + exp_unpack_ch(UNPACK_FBW, audblk->chexpstr[i], audblk->nchgrps[i], audblk->exps[i][0], &audblk->exps[i][1], audblk->fbw_exp[i]); if(audblk->cplinu) - exp_unpack_ch(UNPACK_CPL, audblk->cplexpstr, audblk->ncplgrps, audblk->cplabsexp << 1, - audblk->cplexps, &audblk->cpl_exp[audblk->cplstrtmant]); + exp_unpack_ch(UNPACK_CPL, audblk->cplexpstr, audblk->ncplgrps, audblk->cplabsexp << 1, audblk->cplexps, &audblk->cpl_exp[audblk->cplstrtmant]); if(bsi->lfeon) - exp_unpack_ch(UNPACK_LFE, audblk->lfeexpstr, 2, audblk->lfeexps[0], - &audblk->lfeexps[1], audblk->lfe_exp); + exp_unpack_ch(UNPACK_LFE, audblk->lfeexpstr, 2, audblk->lfeexps[0], &audblk->lfeexps[1], audblk->lfe_exp); } -static void -exp_unpack_ch(uint_16 type,uint_16 expstr,uint_16 ngrps,uint_16 initial_exp, - uint_16 exps[], uint_16 *dest) +/** + * + **/ + +static inline void exp_unpack_ch(uint16_t type,uint16_t expstr,uint16_t ngrps,uint16_t initial_exp, + uint16_t exps[], uint16_t *dest) { - uint_16 i,j; - sint_16 exp_acc; - sint_16 exp_1,exp_2,exp_3; + uint16_t i,j; + int16_t exp_acc; + int16_t exp_1,exp_2,exp_3; - if(expstr == EXP_REUSE) + if (expstr == EXP_REUSE) return; /* Handle the initial absolute exponent */ @@ -75,8 +77,7 @@ exp_unpack_ch(uint_16 type,uint_16 expstr,uint_16 ngrps,uint_16 initial_exp, dest[j++] = exp_acc; /* Loop through the groups and fill the dest array appropriately */ - for(i=0; i< ngrps; i++) - { + for(i=0; i< ngrps; i++) { if(exps[i] > 124) goto error; @@ -86,8 +87,7 @@ exp_unpack_ch(uint_16 type,uint_16 expstr,uint_16 ngrps,uint_16 initial_exp, exp_acc += (exp_1 - 2); - switch(expstr) - { + switch(expstr) { case EXP_D45: dest[j++] = exp_acc; dest[j++] = exp_acc; @@ -99,8 +99,7 @@ exp_unpack_ch(uint_16 type,uint_16 expstr,uint_16 ngrps,uint_16 initial_exp, exp_acc += (exp_2 - 2); - switch(expstr) - { + switch(expstr) { case EXP_D45: dest[j++] = exp_acc; dest[j++] = exp_acc; @@ -112,8 +111,7 @@ exp_unpack_ch(uint_16 type,uint_16 expstr,uint_16 ngrps,uint_16 initial_exp, exp_acc += (exp_3 - 2); - switch(expstr) - { + switch(expstr) { case EXP_D45: dest[j++] = exp_acc; dest[j++] = exp_acc; @@ -125,11 +123,10 @@ exp_unpack_ch(uint_16 type,uint_16 expstr,uint_16 ngrps,uint_16 initial_exp, } return; - - goto error; error: - if(!error_flag) - fprintf(stderr,"** Invalid exponent - skipping frame **\n"); - error_flag = 1; +#ifdef DEBUG + fprintf (stderr,"** Invalid exponent - skipping frame **\n"); +#endif + HANDLE_ERROR (); } |