mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-29 12:26:20 +08:00
cook: simplify decouple_info()
This commit is contained in:
@ -740,27 +740,24 @@ static void imlt_gain(COOKContext *q, float *inbuffer,
|
|||||||
* @param decouple_tab decoupling array
|
* @param decouple_tab decoupling array
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int vlc = get_bits1(&q->gb);
|
||||||
|
int start = cplband[p->js_subband_start];
|
||||||
|
int end = cplband[p->subbands-1];
|
||||||
|
int length = end - start + 1;
|
||||||
|
|
||||||
static void decouple_info(COOKContext *q, COOKSubpacket *p, int* decouple_tab){
|
if (start > end)
|
||||||
int length, i;
|
|
||||||
|
|
||||||
if(get_bits1(&q->gb)) {
|
|
||||||
if(cplband[p->js_subband_start] > cplband[p->subbands-1]) return;
|
|
||||||
|
|
||||||
length = cplband[p->subbands-1] - cplband[p->js_subband_start] + 1;
|
|
||||||
for (i=0 ; i<length ; i++) {
|
|
||||||
decouple_tab[cplband[p->js_subband_start] + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if(cplband[p->js_subband_start] > cplband[p->subbands-1]) return;
|
if (vlc) {
|
||||||
|
for (i = 0; i < length; i++)
|
||||||
length = cplband[p->subbands-1] - cplband[p->js_subband_start] + 1;
|
decouple_tab[start + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2);
|
||||||
for (i=0 ; i<length ; i++) {
|
} else {
|
||||||
decouple_tab[cplband[p->js_subband_start] + i] = get_bits(&q->gb, p->js_vlc_bits);
|
for (i = 0; i < length; i++)
|
||||||
|
decouple_tab[start + i] = get_bits(&q->gb, p->js_vlc_bits);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user