@@ -103,10 +103,6 @@ void VideoCode::executeStack()
103103 }
104104 else if (i[" action" ] == " Apply" ) {
105105 // /< {"action": 'Apply', "input": 0, "transformation": 'overlay', args: {"fg": 1}}
106- VC_LOG_DEBUG (" transformation: " << i[" transformation" ] << " : " << i[" input" ]);
107-
108- i[" args" ][" framerate" ] = _framerate;
109-
110106 transformation::map.at (i[" transformation" ])(IterableInput (_register[i[" input" ]], i[" startTime" ], i[" endTime" ], _framerate), i[" args" ]);
111107 }
112108 else if (i[" action" ] == " Wait" ) {
@@ -239,14 +235,6 @@ static void overlayKeptInput(cv::Mat &background, const Frame &frame)
239235 const cv::Vec4b &bgPixel = background.at <cv::Vec4b>(y + dst.y , x + dst.x );
240236 const cv::Vec4b &ovPixel = overlay.at <cv::Vec4b>(y + src.y , x + src.x );
241237
242- // if (ovPixel[0] == 0 && ovPixel[1] == 0 && ovPixel[1] == 0 && ovPixel[3] != 0)
243- // {
244- // // std::cout << "x:" << x << std::endl;
245- // // std::cout << "y:" << y << std::endl;
246- // // std::cout << "alpha:" << (int)ovPixel[3] << std::endl;
247- // continue;
248- // }
249-
250238 const float alphaBg = bgPixel[3 ] / 255 .0f ;
251239 const float alphaOv = ovPixel[3 ] / 255 .0f ;
252240
@@ -300,28 +288,20 @@ void VideoCode::goToLastFrame()
300288 std::cout << std::format (" Current Label set to '{}' at frame '{}'." , _currentLabel, _index) << std::endl;
301289}
302290
303- void VideoCode::goToPreviousLabel ()
291+ void VideoCode::backward3frame ()
304292{
305- if (_labels[_currentLabel] == 0 ) {
306- goToLabel (_currentLabel);
307- std::cout << std::format (" Timeline set to the start of the current label '{}', at frame '{}'." , _currentLabel, _index) << std::endl;
293+ if (_index < 3 * _framerate) {
294+ _index = 0 ;
308295 }
309296 else {
310- goToLabel (std::prev (_labelsByVal.find (_labels[_currentLabel]))->second );
311- std::cout << std::format (" Timeline set to the previous label '{}', at frame '{}'." , _currentLabel, _index) << std::endl;
297+ _index -= 3 * _framerate;
312298 }
313299}
314300
315- void VideoCode::goToNextLabel ()
301+ void VideoCode::forward3frame ()
316302{
317- auto next = std::next (_labelsByVal.find (_labels[_currentLabel]));
318-
319- if (next == _labelsByVal.end ()) {
303+ _index += 5 * _framerate;
304+ if (_index > _frames.size ()) {
320305 _index = _frames.size () - 1 ;
321- std::cout << std::format (" Timeline set to last index, '{}'" , _index) << std::endl;
322- }
323- else {
324- goToLabel (next->second );
325- std::cout << std::format (" Timeline set to the next label '{}', at frame '{}'." , _currentLabel, _index) << std::endl;
326306 }
327307}
0 commit comments