MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / decode_vectors

Function decode_vectors

libavcodec/cook.c:619–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617
618
619static void decode_vectors(COOKContext* q, COOKSubpacket* p, int* category,
620 int *quant_index_table, float* mlt_buffer){
621 /* A zero in this table means that the subband coefficient is
622 random noise coded. */
623 int subband_coef_index[SUBBAND_SIZE];
624 /* A zero in this table means that the subband coefficient is a
625 positive multiplicator. */
626 int subband_coef_sign[SUBBAND_SIZE];
627 int band, j;
628 int index=0;
629
630 for(band=0 ; band<p->total_subbands ; band++){
631 index = category[band];
632 if(category[band] < 7){
633 if(unpack_SQVH(q, p, category[band], subband_coef_index, subband_coef_sign)){
634 index=7;
635 for(j=0 ; j<p->total_subbands ; j++) category[band+j]=7;
636 }
637 }
638 if(index>=7) {
639 memset(subband_coef_index, 0, sizeof(subband_coef_index));
640 memset(subband_coef_sign, 0, sizeof(subband_coef_sign));
641 }
642 q->scalar_dequant(q, index, quant_index_table[band],
643 subband_coef_index, subband_coef_sign,
644 &mlt_buffer[band * SUBBAND_SIZE]);
645 }
646
647 if(p->total_subbands*SUBBAND_SIZE >= q->samples_per_channel){
648 return;
649 } /* FIXME: should this be removed, or moved into loop above? */
650}
651
652
653/**

Callers 1

mono_decodeFunction · 0.85

Calls 1

unpack_SQVHFunction · 0.85

Tested by

no test coverage detected