Lines Matching refs:pSegment

44         static const KeyType*   GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx )  in GetKey()  argument
45 { return &(pSegment->fv64.m_KeyValue[ keyIdx ]); } in GetKey()
60 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
61 { return &(pSegment->fv32.m_KeyValue[ keyIdx ]); } in GetKey()
63 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
65 f32 decoded = (frame - pSegment->fv32.m_FrameOffset) / pSegment->fv32.m_FrameScale; in QuantizedFrame()
69 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
72 return frame * pSegment->fv32.m_FrameScale + pSegment->fv32.m_FrameOffset; in GetFrameF32()
74 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
77 return value * pSegment->fv32.m_Scale + pSegment->fv32.m_Offset; in GetValue()
88 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
89 { return &(pSegment->fvss128.m_KeyValue[ keyIdx ]); } in GetKey()
106 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
107 { return &(pSegment->fvss64.m_KeyValue[ keyIdx ]); } in GetKey()
109 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
111 … f32 decoded = (frame - pSegment->fvss64.m_FrameOffset) / pSegment->fvss64.m_FrameScale; in QuantizedFrame()
115 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
118 return frame * pSegment->fvss64.m_FrameScale + pSegment->fvss64.m_FrameOffset; in GetFrameF32()
120 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
123 return value * pSegment->fvss64.m_Scale + pSegment->fvss64.m_Offset; in GetValue()
136 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
137 { return &(pSegment->fvss48.m_KeyValue[ keyIdx ]); } in GetKey()
139 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
141 … f32 decoded = (frame - pSegment->fvss48.m_FrameOffset) / pSegment->fvss48.m_FrameScale; in QuantizedFrame()
145 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
148 return frame * pSegment->fvss48.m_FrameScale + pSegment->fvss48.m_FrameOffset; in GetFrameF32()
150 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
153 return value * pSegment->fvss48.m_Scale + pSegment->fvss48.m_Offset; in GetValue()
167 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
168 { return &(pSegment->fvs96.m_KeyValue[ keyIdx ]); } in GetKey()
184 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
185 { return &(pSegment->fvs48.m_KeyValue[ keyIdx ]); } in GetKey()
187 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
189 … f32 decoded = (frame - pSegment->fvs48.m_FrameOffset) / pSegment->fvs48.m_FrameScale; in QuantizedFrame()
193 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
196 return frame * pSegment->fvs48.m_FrameScale + pSegment->fvs48.m_FrameOffset; in GetFrameF32()
198 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
201 return value * pSegment->fvs48.m_Scale + pSegment->fvs48.m_Offset; in GetValue()
213 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
214 { return &(pSegment->fvs32.m_KeyValue[ keyIdx ]); } in GetKey()
216 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
218 … f32 decoded = (frame - pSegment->fvs32.m_FrameOffset) / pSegment->fvs32.m_FrameScale; in QuantizedFrame()
222 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
225 return frame * pSegment->fvs32.m_FrameScale + pSegment->fvs32.m_FrameOffset; in GetFrameF32()
227 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
230 return value * pSegment->fvs32.m_Scale + pSegment->fvs32.m_Offset; in GetValue()
405 GetKeyFV_( const Segment* pSegment, f32 frame ) in GetKeyFV_() argument
407 typename Traits::FrameType quantizedFrame = Traits::QuantizedFrame( pSegment, frame ); in GetKeyFV_()
411 const typename Traits::KeyType* pFirstKey = Traits::GetKey(pSegment, 0); in GetKeyFV_()
418 …const typename Traits::KeyType* pLastKey = Traits::GetKey(pSegment, pSegment->m_NumFrameValues - 1… in GetKeyFV_()
425 …uint keyIdx = static_cast<uint>( frame * pSegment->m_InvDuration * (pSegment->m_NumFrameValues - 1… in GetKeyFV_()
426 NW_ASSERT( keyIdx <= pSegment->m_NumFrameValues - 1U ); in GetKeyFV_()
428 const typename Traits::KeyType* pKey = Traits::GetKey(pSegment, keyIdx); in GetKeyFV_()
435 NW_ASSERT( Traits::GetKey(pSegment, 0) < pKey ); in GetKeyFV_()
443 NW_ASSERT( pKey < Traits::GetKey(pSegment, pSegment->m_NumFrameValues - 1) ); in GetKeyFV_()
448 NW_ASSERT( Traits::GetKey(pSegment, 0) < pKey ); in GetKeyFV_()
483 …const ResFloatSegmentData* pSegment = reinterpret_cast<const ResFloatSegmentData*>( pOffset->to_pt… in GetFloatSegment_() local
485 if ( pSegment->m_EndFrame > frame ) in GetFloatSegment_()
487 return pSegment; in GetFloatSegment_()
496 GetFloatKeyFV_( const ResFloatSegmentFVData* pSegment, f32 frame ) in GetFloatKeyFV_() argument
498 return GetKeyFV_<Traits, ResFloatSegmentFVData>( pSegment, frame ); in GetFloatKeyFV_()
504 CalcStepFloatSegmentFV_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcStepFloatSegmentFV_() argument
506 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcStepFloatSegmentFV_()
508 return Traits::GetValue( pSegment, pKey ); in CalcStepFloatSegmentFV_()
514 CalcLinearFloatSegmentFV_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcLinearFloatSegmentFV_() argument
516 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcLinearFloatSegmentFV_()
518 f32 keyFrame = Traits::GetFrameF32( pSegment, pKey ); in CalcLinearFloatSegmentFV_()
522 return Traits::GetValue( pSegment, pKey ); in CalcLinearFloatSegmentFV_()
527 f32 nextKeyFrame = Traits::GetFrameF32( pSegment, pNextKey ); in CalcLinearFloatSegmentFV_()
530 return Traits::GetValue( pSegment, pKey ) * (1.0f - rate) in CalcLinearFloatSegmentFV_()
531 + Traits::GetValue( pSegment, pNextKey ) * rate; in CalcLinearFloatSegmentFV_()
536 CalcHermiteFloatSegmentFVSS_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcHermiteFloatSegmentFVSS_() argument
538 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcHermiteFloatSegmentFVSS_()
540 f32 keyFrame = Traits::GetFrameF32( pSegment, pKey ); in CalcHermiteFloatSegmentFVSS_()
544 return Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVSS_()
550 f32 d = Traits::GetFrameF32( pSegment, pNextKey ) - keyFrame; in CalcHermiteFloatSegmentFVSS_()
551 f32 v0 = Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVSS_()
552 f32 v1 = Traits::GetValue( pSegment, pNextKey ); in CalcHermiteFloatSegmentFVSS_()
561 CalcHermiteFloatSegmentFVS_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcHermiteFloatSegmentFVS_() argument
563 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcHermiteFloatSegmentFVS_()
567 f32 keyFrame = Traits::GetFrameF32( pSegment, pKey ); in CalcHermiteFloatSegmentFVS_()
571 return Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVS_()
577 f32 d = Traits::GetFrameF32( pSegment, pNextKey ) - keyFrame; in CalcHermiteFloatSegmentFVS_()
578 f32 v0 = Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVS_()
579 f32 v1 = Traits::GetValue( pSegment, pNextKey ); in CalcHermiteFloatSegmentFVS_()
586 typedef f32 (*CalcFloatSegmentFVFunc)( const ResFloatSegmentFVData* pSegment, f32 frame );
651 CalcFloatSegment_( const ResFloatSegmentData* pSegment, f32 frame ) in CalcFloatSegment_() argument
653 NW_NULL_ASSERT( pSegment ); in CalcFloatSegment_()
654 NW_ASSERT( pSegment->m_StartFrame <= frame && frame <= pSegment->m_EndFrame ); in CalcFloatSegment_()
655 NW_ASSERT(!(pSegment->m_Flags & ResFloatSegmentData::FLAG_BAKED)); in CalcFloatSegment_()
657 if ( pSegment->m_Flags & ResFloatSegmentData::FLAG_CONSTANT ) in CalcFloatSegment_()
659 return pSegment->constantValue; in CalcFloatSegment_()
662 … u32 quantizeType = (pSegment->m_Flags & ResFloatSegmentData::FLAG_QUANTIZATION_TYPE_MASK) >> in CalcFloatSegment_()
665 … u32 interporateMode = (pSegment->m_Flags & ResFloatSegmentData::FLAG_INTERPORATE_MODE_MASK) >> in CalcFloatSegment_()
668 …alcFloatSegmentFVTable[ interporateMode ][ quantizeType ]( &(pSegment->fv), frame - pSegment->m_St… in CalcFloatSegment_()
683 const ResFloatSegmentData* pSegment = GetFloatSegment_( pCurve, frame ); in CalcSegmentFloatCurve_() local
685 if ( frame < pSegment->m_StartFrame ) in CalcSegmentFloatCurve_()
688 frame = pSegment->m_StartFrame; in CalcSegmentFloatCurve_()
691 return CalcFloatSegment_( pSegment, frame ); in CalcSegmentFloatCurve_()