MCPcopy Create free account
hub / github.com/audeering/opensmile / dataProcessorCustomFinalise

Method dataProcessorCustomFinalise

src/core/winToVecProcessor.cpp:613–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611*/
612
613int cWinToVecProcessor::dataProcessorCustomFinalise()
614{
615 Ni = reader_->getLevelN();
616 Nfi = reader_->getLevelNf();
617 No = 0;
618 // Nfo = Ni;
619 inputPeriod = reader_->getLevelT();
620
621 int i,n;
622
623 long e=0;
624
625 if (wholeMatrixMode) {
626
627 if (processFieldsInMatrixMode) {
628 for (i = 0; i < Nfi; i++) {
629 int __N=0;
630 const char *tmp = reader_->getFieldName(i, &__N);
631 No += setupNamesForElement(i, tmp, __N);
632 }
633 } else {
634 int __N=0;
635 const char *tmp = reader_->getFieldName(0,&__N);
636 No += setupNamesForElement(0, tmp, Ni);
637 }
638
639 } else {
640
641
642 for (i=0; i<Nfi; i++) {
643 int __N=0;
644 const char *tmp = reader_->getFieldName(i,&__N);
645 if (tmp == NULL) { SMILE_IERR(1,"reader->getFieldName(%i) failed (return value = NULL)!",i); return 0; }
646
647 {
648 if (__N > 1) {
649
650 for (n=0; n<__N; n++) {
651 char *na = reader_->getElementName(e);
652 No += setupNamesForElement(e++, na, 1);
653 free(na);
654 }
655
656 } else {
657 No += setupNamesForElement(e++, tmp, 1);
658 }
659 }
660 }
661
662 }
663
664 namesAreSet_ = 1;
665
666 if (!wholeMatrixMode) {
667 Mult = getMultiplier();
668 if (Mult*Ni != No) COMP_ERR("Mult not constant (as returned by setupNamesForField! This is not allowed! Mult*Ni=%i <> No=%i",Mult*Ni,No);
669 if (tmpFrameF==NULL) tmpFrameF=(FLOAT_DMEM*)calloc(1,sizeof(FLOAT_DMEM)*Mult);
670 }

Callers

nothing calls this directly

Calls 5

getLevelNMethod · 0.45
getLevelNfMethod · 0.45
getLevelTMethod · 0.45
getFieldNameMethod · 0.45
getElementNameMethod · 0.45

Tested by

no test coverage detected