This project involves speeding up a video compression tool that processes a folder of uncompressed image files (".ppm" extension) and creates a single zip file with all images after compression. The images in the input folder are named with their frame numbers, and the output zip file should follow lexicographical order.
-
Download the starting package from the provided link.
-
Build, and run the tool. You might need to install the zlib library.
$ make
$ make test
-
Modify the code to make it faster using threads, with the following constraints:
- Only use the pthread library.
- No more than 20 threads (including the main thread) can be running simultaneously.
The submission is divided into two parts:
PART #1:
- Create a file named
vzip.zip
containing a folder namedsrc
. - The
src
folder must contain:- Your source code in C.
- A Makefile to build the executable named
vzip
.
- Ensure your code is buildable and runnable in a Linux environment with gcc version 11.4.0.
Achieving a speedup three times faster than the original code guarantees a C for the speeding factor criterion. The fastest group in class will define the A+ grade (full credit).
Implement a visualizer for vzip videos for up to 20 points of extra credit. Show your visualizer working during your video presentation and submit its code to Canvas.
Visualizer Task Description:
- Implement a loader for a vzip file that decompresses its frames.
- Show each frame on screen, one after the other, as if playing a video.
Visualizer Important Remarks:
- No need to implement control functions (play, stop, rewind, etc.).
- The visualizer can use any library (but must use zlib to decompress the video file).
- You don't have to use C language for the visualizer.
- No need to use threads in the visualizer.
- Include a README file with instructions to build and run your code in your submission.
- Use the pthread library to implement threading.
- Ensure no more than 20 threads are running simultaneously.
- Focus on optimizing the compression process using threads.