#include <DCFmpacket_Rtrsmra_float_array.h>
Inheritance diagram for DCFmpacket< Rtrsmra< float, array > >:


Public Member Functions | |
| DCFmpacket (const int, const int, const int, DCFencode< Rtrsmra< float, array > > &) | |
| void | encode (Rtrsmra< float, array > &, const char) |
| DCFmpacket< Rtrsmra< float, array > > & | operator() (Rtrsmra< float, array > &, const char) |
| void | replace (Rtrsmra< float, array > &) |
| void | setencode (const int, const int, const int, DCFencode< Rtrsmra< float, array > > &) |
| void | setencode (const int sizebmax, const int bplen_sizeb, const int bplen_n) |
Protected Attributes | |
| DCFencode< Rtrsmra< float, array > > | _enc |
|
||||||||||||||||||||
|
Definition at line 12 of file DCFmpacket_Rtrsmra_float_array.cpp.
00016 : DCFmpacketBase(sizebmax, bplen_sizeb, bplen_n) { 00017 00018 _enc=enc; 00019 }; |
|
||||||||||||
|
Definition at line 39 of file DCFmpacket_Rtrsmra_float_array.cpp.
00042 {
00043
00044 float tmp;
00045 bytepack bp;
00046
00047 int n;
00048
00049 int a;
00050
00051 if (sw(mcode)) { n=((( x.mrastep() )&( (1<<x.mmax()) -1 ) )>> m(mcode)); }
00052 else { n=0; }
00053
00054 clear();
00055 set(mcode,n);
00056
00057 for(a=0;a<=_enc.amax();a++) {
00058 if (sw(mcode)) { tmp=x.wav(a,m(mcode)); }
00059 else { tmp=x.scal(a,m(mcode)); }
00060 if (fabs(tmp)>=_enc.quantcoef()) {
00061 put( bp(a,_enc.bplen_a()) );
00062 put( bp(tmp,_enc.bplen_coef()) );
00063 }
00064 }
00065
00066 };
|
|
||||||||||||
|
Definition at line 31 of file DCFmpacket_Rtrsmra_float_array.cpp.
00034 {
00035 DCFmpacket< Rtrsmra<float,array> >::encode(x,mcode);
00036 return *this;
00037 };
|
|
|
Definition at line 69 of file DCFmpacket_Rtrsmra_float_array.cpp. References j, and bytepack.size().
00069 {
00070
00071 int next;
00072 int i;
00073 int j;
00074 int a;
00075 int a1;
00076 float tmp;
00077 bytepack bp;
00078
00079 next=0;
00080 a=0;
00081 for(i=0;i<(sizeb()/(_enc.bplen_a()+_enc.bplen_coef()));i++) {
00082 bp(int(0),_enc.bplen_a());
00083 for(j=0;j<bp.size();j++) { bp[j]=_ptmpacket[next++]; }
00084 a1=int(bp);
00085
00086 bp(0.0,_enc.bplen_coef());
00087 for(j=0;j<bp.size();j++) { bp[j]=_ptmpacket[next++]; }
00088 tmp=float(bp);
00089
00090 while (a<a1) {
00091 if (sw()) { x.wav(a,m(),0); }
00092 else { x.scal(a,m(),0); }
00093 a++;
00094 }
00095 if (sw()) { x.wav(a,m(),tmp); }
00096 else { x.scal(a,m(),tmp); }
00097 a++;
00098 }
00099
00100 while (a<=_enc.amax()) {
00101 if (sw()) { x.wav(a,m(),0); }
00102 else { x.scal(a,m(),0); }
00103 a++;
00104 }
00105
00106 };
|
|
||||||||||||||||||||
|
Definition at line 21 of file DCFmpacket_Rtrsmra_float_array.cpp.
|
|
||||||||||||||||
|
Reimplemented from DCFmpacketBase. Definition at line 26 of file DCFmpacket_Rtrsmra_float_array.h. References DCFmpacketBase.setencode().
00030 {
00031 DCFmpacketBase::setencode( sizebmax, bplen_sizeb, bplen_n );
00032 }
|
|
|
Definition at line 53 of file DCFmpacket_Rtrsmra_float_array.h. |
1.3.6