HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CL_DynamicTimeWarp.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: CL_DynamicTimeWarp.h ( Clip Library, C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __CL_DynamicTimeWarp_h__
13 #define __CL_DynamicTimeWarp_h__
14 
15 #include "CL_API.h"
16 
17 #include "CL_TimeWarp.h"
18 
19 #include <UT/UT_Interrupt.h>
20 #include <UT/UT_SharedPtr.h>
21 #include <UT/UT_UniquePtr.h>
22 #include <UT/UT_WorkBuffer.h>
23 
24 class UT_OStream;
25 class CL_Clip;
26 class CL_Track;
27 
29 {
30 public:
33  ~CL_DynamicTimeWarp() override;
34 
35  void warpClip(bool loop_reference,
36  UT_WorkBuffer &error_msg);
37 
38  fpreal warpSubClip(int src_start, int src_length,
39  int ref_start, int ref_length,
40  bool compute_warp,
41  UT_AutoInterrupt &boss);
42 
43  bool boundMaxStep(int max_step);
44  bool boundMaxStall(int max_stall);
45  void unboundWarp();
46 
47  bool computeWeightFnRotations();
48  bool computeWeightFnEulerDistance();
49 
50 private:
51 
52  void findShortestStep(int s, int r);
53  bool computeShortestPaths(int num_loops, bool do_parallel,
54  UT_AutoInterrupt &boss);
55  void computeWarpMap(int num_loops, bool loop_reference);
56 
57  class WarpPath
58  {
59  public:
60  fpreal weight;
61  int s;
62  int r;
63  };
64  WarpPath &getShortPath(int src_frame, int ref_frame);
65  fpreal &getWeight(int src_frame, int ref_frame);
66 
67 private:
68 
69  int mySrcStart;
70  int mySrcLength;
71  int myRefStart;
72  int myRefLength;
73 
74  int myMaxStep;
75  bool myMaxStepIsBounded;
76  int myMaxStall;
77  bool myMaxStallIsBounded;
78 
79  UT_SharedPtr<fpreal> myWeight;
80  UT_UniquePtr<WarpPath[]> myShortPaths;
81 };
82 
83 #endif
GLdouble s
Definition: glad.h:3009
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
#define CL_API
Definition: CL_API.h:10
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
fpreal64 fpreal
Definition: SYS_Types.h:277
GLboolean r
Definition: glcorearb.h:1222