Lines Matching refs:psOut
509 static INT encodeIpdOpd(HANDLE_PS_OUT psOut,
516 FDKsbrEnc_WriteBits_ps(hBitBuf, psOut->enableIpdOpd, 1);
518 if(psOut->enableIpdOpd==1) {
519 INT *ipdLast = psOut->ipdLast;
520 INT *opdLast = psOut->opdLast;
522 for(env=0; env<psOut->nEnvelopes; env++) {
523 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->deltaIPD[env], 1);
525 psOut->ipd[env],
527 getNoBands((PS_RESOLUTION)psOut->iidMode),
528 psOut->deltaIPD[env],
531 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->deltaOPD[env], 1);
533 psOut->opd[env],
535 getNoBands((PS_RESOLUTION)psOut->iidMode),
536 psOut->deltaOPD[env],
587 static INT encodePSExtension(const HANDLE_PS_OUT psOut,
592 if(psOut->enableIpdOpd==1) {
594 INT extSize = (2 + encodeIpdOpd(psOut,NULL)+7)>>3;
606 ipdOpdBits += encodeIpdOpd(psOut, hBitBuf );
618 INT FDKsbrEnc_WritePSBitstream(const HANDLE_PS_OUT psOut,
626 if(psOut != NULL){
629 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->enablePSHeader, 1);
631 if(psOut->enablePSHeader) {
633 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->enableIID, 1);
634 if(psOut->enableIID) {
635 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->iidMode, 3);
637 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->enableICC, 1);
638 if(psOut->enableICC) {
639 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->iccMode, 3);
641 if(psOut->enableIpdOpd) {
648 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->frameClass, 1);
649 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, getEnvIdx(psOut->nEnvelopes, psOut->frameClass), 2);
651 if(psOut->frameClass==1) {
652 for(env=0; env<psOut->nEnvelopes; env++) {
653 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->frameBorder[env], 5);
657 if(psOut->enableIID==1) {
658 INT *iidLast = psOut->iidLast;
659 for(env=0; env<psOut->nEnvelopes; env++) {
660 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->deltaIID[env], 1);
662 psOut->iid[env],
664 getNoBands((PS_RESOLUTION)psOut->iidMode),
665 (PS_IID_RESOLUTION)getIIDRes(psOut->iidMode),
666 psOut->deltaIID[env],
669 iidLast = psOut->iid[env];
673 if(psOut->enableICC==1) {
674 INT *iccLast = psOut->iccLast;
675 for(env=0; env<psOut->nEnvelopes; env++) {
676 bitCnt += FDKsbrEnc_WriteBits_ps( hBitBuf, psOut->deltaICC[env], 1);
678 psOut->icc[env],
680 getNoBands((PS_RESOLUTION)psOut->iccMode),
681 psOut->deltaICC[env],
684 iccLast = psOut->icc[env];
689 bitCnt += encodePSExtension(psOut, hBitBuf);
692 } /* if(psOut != NULL) */