Lines Matching refs:pSegment
60 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
61 { return &(pSegment->fv64.m_KeyValue[ keyIdx ]); } in GetKey()
76 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
77 { return &(pSegment->fv32.m_KeyValue[ keyIdx ]); } in GetKey()
79 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
81 f32 decoded = frame / pSegment->fv32.m_FrameScale; in QuantizedFrame()
85 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
88 return frame * pSegment->fv32.m_FrameScale; in GetFrameF32()
90 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
93 return value * pSegment->fv32.m_Scale + pSegment->fv32.m_Offset; in GetValue()
104 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
105 { return &(pSegment->fvss128.m_KeyValue[ keyIdx ]); } in GetKey()
122 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
123 { return &(pSegment->fvss64.m_KeyValue[ keyIdx ]); } in GetKey()
125 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
127 f32 decoded = frame / pSegment->fvss64.m_FrameScale; in QuantizedFrame()
131 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
134 return frame * pSegment->fvss64.m_FrameScale; in GetFrameF32()
136 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
139 return value * pSegment->fvss64.m_Scale + pSegment->fvss64.m_Offset; in GetValue()
152 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
153 { return &(pSegment->fvss48.m_KeyValue[ keyIdx ]); } in GetKey()
155 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
157 f32 decoded = frame / pSegment->fvss48.m_FrameScale; in QuantizedFrame()
161 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
164 return frame * pSegment->fvss48.m_FrameScale; in GetFrameF32()
166 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
169 return value * pSegment->fvss48.m_Scale + pSegment->fvss48.m_Offset; in GetValue()
183 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
184 { return &(pSegment->fvs96.m_KeyValue[ keyIdx ]); } in GetKey()
200 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
201 { return &(pSegment->fvs48.m_KeyValue[ keyIdx ]); } in GetKey()
203 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
205 f32 decoded = frame / pSegment->fvs48.m_FrameScale; in QuantizedFrame()
209 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
212 return frame * pSegment->fvs48.m_FrameScale; in GetFrameF32()
214 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
217 return value * pSegment->fvs48.m_Scale + pSegment->fvs48.m_Offset; in GetValue()
229 static const KeyType* GetKey( const ResFloatSegmentFVData* pSegment, uint keyIdx ) in GetKey() argument
230 { return &(pSegment->fvs32.m_KeyValue[ keyIdx ]); } in GetKey()
232 static FrameType QuantizedFrame( const ResFloatSegmentFVData* pSegment, f32 frame ) in QuantizedFrame() argument
234 f32 decoded = frame / pSegment->fvs32.m_FrameScale; in QuantizedFrame()
238 static f32 GetFrameF32( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetFrameF32() argument
241 return frame * pSegment->fvs32.m_FrameScale; in GetFrameF32()
243 static f32 GetValue( const ResFloatSegmentFVData* pSegment, const KeyType* pKey ) in GetValue() argument
246 return value * pSegment->fvs32.m_Scale + pSegment->fvs32.m_Offset; in GetValue()
421 GetKeyFV_( const Segment* pSegment, f32 frame ) in GetKeyFV_() argument
425 typename Traits::FrameType quantizedFrame = Traits::QuantizedFrame( pSegment, frame ); in GetKeyFV_()
429 const typename Traits::KeyType* pFirstKey = Traits::GetKey(pSegment, 0); in GetKeyFV_()
436 …const typename Traits::KeyType* pLastKey = Traits::GetKey(pSegment, pSegment->m_NumFrameValues - 1… in GetKeyFV_()
443 …uint keyIdx = static_cast<uint>( frame * pSegment->m_InvDuration * (pSegment->m_NumFrameValues - 1… in GetKeyFV_()
444 NW_ASSERT( keyIdx <= pSegment->m_NumFrameValues - 1U ); in GetKeyFV_()
446 const typename Traits::KeyType* pKey = Traits::GetKey(pSegment, keyIdx); in GetKeyFV_()
453 NW_ASSERT( Traits::GetKey(pSegment, 0) < pKey ); in GetKeyFV_()
461 NW_ASSERT( pKey < Traits::GetKey(pSegment, pSegment->m_NumFrameValues - 1) ); in GetKeyFV_()
466 NW_ASSERT( Traits::GetKey(pSegment, 0) < pKey ); in GetKeyFV_()
501 …const ResFloatSegmentData* pSegment = reinterpret_cast<const ResFloatSegmentData*>( pOffset->to_pt… in GetFloatSegment_() local
503 if ( pSegment->m_EndFrame > frame ) in GetFloatSegment_()
505 return pSegment; in GetFloatSegment_()
514 GetFloatKeyFV_( const ResFloatSegmentFVData* pSegment, f32 frame ) in GetFloatKeyFV_() argument
517 return GetKeyFV_<Traits, ResFloatSegmentFVData>( pSegment, frame ); in GetFloatKeyFV_()
523 CalcStepFloatSegmentFV_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcStepFloatSegmentFV_() argument
526 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcStepFloatSegmentFV_()
528 return Traits::GetValue( pSegment, pKey ); in CalcStepFloatSegmentFV_()
534 CalcLinearFloatSegmentFV_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcLinearFloatSegmentFV_() argument
537 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcLinearFloatSegmentFV_()
538 …const typename Traits::KeyType* pLastKey = Traits::GetKey(pSegment, pSegment->m_NumFrameValues - 1… in CalcLinearFloatSegmentFV_()
540 f32 keyFrame = Traits::GetFrameF32( pSegment, pKey ); in CalcLinearFloatSegmentFV_()
544 return Traits::GetValue( pSegment, pKey ); in CalcLinearFloatSegmentFV_()
549 f32 nextKeyFrame = Traits::GetFrameF32( pSegment, pNextKey ); in CalcLinearFloatSegmentFV_()
552 return Traits::GetValue( pSegment, pKey ) * (1.0f - rate) in CalcLinearFloatSegmentFV_()
553 + Traits::GetValue( pSegment, pNextKey ) * rate; in CalcLinearFloatSegmentFV_()
558 CalcHermiteFloatSegmentFVSS_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcHermiteFloatSegmentFVSS_() argument
561 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcHermiteFloatSegmentFVSS_()
562 …const typename Traits::KeyType* pLastKey = Traits::GetKey(pSegment, pSegment->m_NumFrameValues - 1… in CalcHermiteFloatSegmentFVSS_()
564 f32 keyFrame = Traits::GetFrameF32( pSegment, pKey ); in CalcHermiteFloatSegmentFVSS_()
568 return Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVSS_()
574 f32 d = Traits::GetFrameF32( pSegment, pNextKey ) - keyFrame; in CalcHermiteFloatSegmentFVSS_()
575 f32 v0 = Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVSS_()
576 f32 v1 = Traits::GetValue( pSegment, pNextKey ); in CalcHermiteFloatSegmentFVSS_()
585 CalcHermiteFloatSegmentFVS_( const ResFloatSegmentFVData* pSegment, f32 frame ) in CalcHermiteFloatSegmentFVS_() argument
588 const typename Traits::KeyType* pKey = GetFloatKeyFV_<Traits>( pSegment, frame ); in CalcHermiteFloatSegmentFVS_()
589 …const typename Traits::KeyType* pLastKey = Traits::GetKey(pSegment, pSegment->m_NumFrameValues - 1… in CalcHermiteFloatSegmentFVS_()
593 f32 keyFrame = Traits::GetFrameF32( pSegment, pKey ); in CalcHermiteFloatSegmentFVS_()
597 return Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVS_()
603 f32 d = Traits::GetFrameF32( pSegment, pNextKey ) - keyFrame; in CalcHermiteFloatSegmentFVS_()
604 f32 v0 = Traits::GetValue( pSegment, pKey ); in CalcHermiteFloatSegmentFVS_()
605 f32 v1 = Traits::GetValue( pSegment, pNextKey ); in CalcHermiteFloatSegmentFVS_()
612 typedef f32 (*CalcFloatSegmentFVFunc)( const ResFloatSegmentFVData* pSegment, f32 frame );
677 CalcFloatSegment_( const ResFloatSegmentData* pSegment, f32 frame ) in CalcFloatSegment_() argument
679 NW_NULL_ASSERT( pSegment ); in CalcFloatSegment_()
680 NW_ASSERT( pSegment->m_StartFrame <= frame && frame <= pSegment->m_EndFrame ); in CalcFloatSegment_()
681 NW_ASSERT(!(pSegment->m_Flags & ResFloatSegmentData::FLAG_BAKED)); in CalcFloatSegment_()
683 if ( pSegment->m_Flags & ResFloatSegmentData::FLAG_CONSTANT ) in CalcFloatSegment_()
685 return pSegment->constantValue; in CalcFloatSegment_()
688 … u32 quantizeType = (pSegment->m_Flags & ResFloatSegmentData::FLAG_QUANTIZATION_TYPE_MASK) >> in CalcFloatSegment_()
691 … u32 interporateMode = (pSegment->m_Flags & ResFloatSegmentData::FLAG_INTERPORATE_MODE_MASK) >> in CalcFloatSegment_()
694 …alcFloatSegmentFVTable[ interporateMode ][ quantizeType ]( &(pSegment->fv), frame - pSegment->m_St… in CalcFloatSegment_()
709 const ResFloatSegmentData* pSegment = GetFloatSegment_( pCurve, frame ); in CalcSegmentFloatCurve_() local
711 if ( frame < pSegment->m_StartFrame ) in CalcSegmentFloatCurve_()
714 frame = pSegment->m_StartFrame; in CalcSegmentFloatCurve_()
717 return CalcFloatSegment_( pSegment, frame ); in CalcSegmentFloatCurve_()