In this project, you’ll speed up video compression tool. This tool receives a fo
In this project, you’ll speed up video compression tool. This tool receives a folder with uncompressed image files (“.ppm” extension) and creates a single zip file with all images after compression. The images in the input folder will have the frame number in their file name, and the output zip file follows lexicographical order.
This is a group project. Each group must have at least 3 members and at most 3 members. If you cannot find a group by March 1st, you will be randomly assigned to a random group after that.
Task description
1) Download the starting package here Download here.
2) Unzip, build, and run the tool. You might have to install the zlibLinks to an external site. library.
$ unzip project2.zip
$ cd project2
$ make
$ make test3) Change the code to make it faster using threads. You are only allowed to use the pthread library to this end, nothing else. Using other libraries, changing compiler flags, and other tricks are not allowed. If, at any point in time, your program has more than 20 threads (including the main thread) in execution, your submission will be deemed invalid. In other words, you cannot have more than 20 threads running simultaneously.
Submission
The submission is divided in two parts.
The correctness of your submissions will be automatically evaluated by Gradescope. You must prepare a file named vzip.zip containing a folder named src. This folder must contain your source code in C language (other languages are not allowed) and a Makefile to build the executable named vzip. This code must be buildable and runnable in a Linux environment with a recent version gcc (more precisely, gcc version 11.4.0 with Ubuntu 11.4.0-1ubuntu1 22.04). Your code will be tested in a machine with 4.0 CPU cores and 6.0GB of RAM.
Rubrics
Speeding factor: 50%
Code style: 10%
Presentation: 40%
Getting the code three times faster than the original code will guarantee a C for the speeding factor criterion. The A+ grade (full credit) will be defined by the fastest group in class.
Code style will have deductions for bad indentation and organization, and for the lack of meaningful comments.The speeding factor part of the grade would be computed by the equation: (factor-3)/1.2+7.5
YOU NEED TO GENERATE A FACTOR OF 6 TO GET FULL SCORE.
Extra credit opportunity (20 points)
Your group can implement a visualizer of vzip videos for up to 20 points of extra credit. You do not have to submit it to Gradescope. But you must show your visualizer working during your video presentation and submit its code to Canvas.
Task description:
1) implement a loader for a vzip file that decompresses its frames;
2) show each frame on screen, one after the other, as if you were playing a video.
Important remarks:
1) There is no need to implement control functions (play, stop, rewind, etc). You just have to play the video once, from start to end, once you execute the visualizer for a video file.
2) The visualizer can use any library of your choice (although you must use zlib to decompress the video file).
3) You don’t have to use C language to code it (but the language you choose must support zlib).
4) There is no need to use threads in the visualizer.
5) Please include a README file with instructions to build and run your code in your submission.
Leave a Reply