#include <DCFmpacket_Rtmra_float_scalar.h>
Inheritance diagram for DCFmpacket< Rtmra< float, scalar > >:


Public Member Functions | |
| DCFmpacket (const int, const int, const int, DCFencode< Rtmra< float, scalar > > &) | |
| void | encode (Rtmra< float, scalar > &, const char) |
| DCFmpacket< Rtmra< float, scalar > > & | operator() (Rtmra< float, scalar > &, const char) |
| void | replace (Rtmra< float, scalar > &) |
| void | setencode (const int, const int, const int, DCFencode< Rtmra< float, scalar > > &) |
| void | setencode (const int sizebmax, const int bplen_sizeb, const int bplen_n) |
Protected Attributes | |
| DCFencode< Rtmra< float, scalar > > | _enc |
|
||||||||||||||||||||
|
Definition at line 9 of file DCFmpacket_Rtmra_float_scalar.cpp.
00013 : DCFmpacketBase(sizebmax, bplen_sizeb, bplen_n) { 00014 00015 _enc=enc; 00016 00017 }; |
|
||||||||||||
|
Definition at line 39 of file DCFmpacket_Rtmra_float_scalar.cpp.
00042 {
00043
00044 float tmp;
00045 bytepack bp;
00046
00047 int n;
00048
00049 if (sw(mcode)) { n=((( x.mrastep() )&( (1<<x.mmax()) -1 ) )>> m(mcode)); }
00050 else { n=0; }
00051
00052 clear();
00053 set(mcode,n);
00054
00055 if (sw(mcode)) { tmp=x.wav(m(mcode)); }
00056 else { tmp=x.scal(m(mcode)); }
00057
00058 if (fabs(tmp)>=_enc.quantcoef()) {
00059 #ifdef STORM_DEBUG
00060 cout << "DCFmpacket.encode(): put() : mcode, n, tmp = "
00061 << int( (unsigned char)(mcode) ) << ' ' << n << ' ' << tmp << '\n';
00062 #endif
00063 put( bp(tmp,_enc.bplen_coef()) );
00064 }
00065
00066 };
|
|
||||||||||||
|
Definition at line 31 of file DCFmpacket_Rtmra_float_scalar.cpp.
00034 {
00035 DCFmpacket< Rtmra<float,scalar> >::encode(x,mcode);
00036 return *this;
00037 };
|
|
|
Definition at line 69 of file DCFmpacket_Rtmra_float_scalar.cpp. References j, and bytepack.size().
00069 {
00070
00071 int j;
00072 float tmp;
00073 bytepack bp;
00074
00075 if (empty()) { tmp=0; }
00076 else {
00077 bp(0,_enc.bplen_coef());
00078 for(j=0;j<bp.size();j++) { bp[j]=_ptmpacket[j]; }
00079 tmp=float(bp);
00080 }
00081
00082 #ifdef STORM_DEBUG
00083 cout << "DCFmpacket.replace(): sw m coef "
00084 << sw() << ' ' << m() << ' ' << tmp << '\n';
00085 #endif
00086
00087 if (sw()) { x.wav(m(),tmp); }
00088 else { x.scal(m(),tmp); }
00089
00090 };
|
|
||||||||||||||||||||
|
Definition at line 19 of file DCFmpacket_Rtmra_float_scalar.cpp.
|
|
||||||||||||||||
|
Reimplemented from DCFmpacketBase. Definition at line 19 of file DCFmpacket_Rtmra_float_scalar.h. References DCFmpacketBase.setencode().
00022 {
00023 DCFmpacketBase::setencode( sizebmax, bplen_sizeb, bplen_n );
00024 }
|
|
|
Definition at line 44 of file DCFmpacket_Rtmra_float_scalar.h. |
1.3.6