You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed codacy review warnings
This commit is contained in:
@@ -39,6 +39,8 @@ using google::protobuf::util::TimeUtil;
|
||||
CVStabilization::CVStabilization(std::string processInfoJson, ProcessingController &processingController)
|
||||
: processingController(&processingController){
|
||||
SetJson(processInfoJson);
|
||||
start = 0;
|
||||
end = 0;
|
||||
}
|
||||
|
||||
// Process clip and store necessary stabilization data
|
||||
@@ -58,7 +60,7 @@ void CVStabilization::stabilizeClip(openshot::Clip& video, size_t _start, size_t
|
||||
cv::Size readerDims(video.Reader()->info.width, video.Reader()->info.height);
|
||||
|
||||
size_t frame_number;
|
||||
if(!process_interval || end == 0 || end-start <= 0){
|
||||
if(!process_interval || end == 0 || end-start == 0){
|
||||
// Get total number of frames in video
|
||||
start = video.Start() * video.Reader()->info.fps.ToInt();
|
||||
end = video.End() * video.Reader()->info.fps.ToInt();
|
||||
@@ -230,7 +232,7 @@ std::map<size_t,CamTrajectory> CVStabilization::SmoothTrajectory(std::vector <Ca
|
||||
int count = 0;
|
||||
|
||||
for(int j=-smoothingWindow; j <= smoothingWindow; j++) {
|
||||
if(i+j >= 0 && i+j < trajectory.size()) {
|
||||
if(i+j < trajectory.size()) {
|
||||
sum_x += trajectory[i+j].x;
|
||||
sum_y += trajectory[i+j].y;
|
||||
sum_a += trajectory[i+j].a;
|
||||
|
||||
Reference in New Issue
Block a user