Question: A c library implementaion and command testing executables to validate it , library should contain basic decode and encode in the format : [ No

A c library implementaion and command testing executables to validate it , library should contain basic decode and encode in the format :
[No. Frames (long)][Channels (uchar)][Height (uchar)]
[Width (uchar)][Ch0,H0,W0][Ch0,H0,W1][Ch0,H0,W2]....
[Ch0,H1,W0]
[No. Frames] is the Number of Frames in the full video in the format long
[Channels] is the number of Channels in each frame, maximum 3, in the format
unsigned char
[Height] is the height of the number of pixels in each frame, maximum 128, in the
format unsigned char[Width] is the width of the number of pixels in each frame, maximum 128, in theformat unsigned char
plus the following fuctions
`reverse` Reverse the entire video
The frames should be saved in reverse starting from the last frame in the video to the
first frame in the video.
`swap_channel` Swap channel in video frames
Taking as input the parameters of the two channels to swap, `[Channel
Number],[Channel Number]` in unsigned char, for each frame in the video,
the two channels should be swapped around.
`clip_channel` Clips the range of each pixel in each frame
Taking as input channel number `[channel number]` and the range to clip
`[minimum, maximum]` in unsigned char, the value of each pixel in all frames
should be limited to be within this range where values outside of the range are set to
the respective minimum or maximum value.
`scale_channel` Scales each pixel in each frame
Taking as input channel number `[channel number]` and the scale factor `[scale
factor]` in float which should be multiplied to each pixel in each frame.
Your testing executable should be able to receive an arbitrary number of input
arguments. For instance, your program will be tested by running the general
formulation `./runme [input file][output file][-S/-M][function
name][options]` and specifically the following commands (as defined above):
-`./runme [input][output][-S/-M] reverse`
-`./runme [input][output][-S/-M] swap_channel 1,2`
-`./runme [input][output][-S/-M] clip_channel 1[10,200]`
-`./runme [input][output][-S/-M] scale_channel 11.5`
Where [input]and [output]are variable length file paths and [-S/-M] are
performance mode options to prioritise Speed (S) or Memory (M) where optimisations
are to be determined and implemented by you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!