DoC hEx
16th July 2004, 09:06
Hi Guys,
I need some advice on creating an AVS Plug in, the goal of which is to create a Video Comparison tool for doing personal Codec Testing/Ratings.
Basic Premise: Take original source and covert it to the desired output resolution of the codec. Using this new version of the original source, encode with the codecs to be tested. Then use an AVS Plug-in to compare the original encoded source against the output encoded version to generate an average rating. This Average Rating will be explained below in more detail once I get a couple of questions out of the way.
Q. My first question, is Huffyuv 0.2.2.1 the best lossless codec for the job? Or is there another? I’m not too worried about the size of the outputted file as Quality is paramount to size! It must be a perfect copy of the original. Meaning if I where to compare the RGB value of every individual pixel it would be Identical (meaning the resized resolution obviously) to the original source. The reason for creating this file is two fold. I don’t want to rely on Bicubic resize doing something different if run twice. While I’m sure it would be the same, in the interest of being 100% certain it would be best to only do this once. Plus it will save CPU cycles in the long run with the mutli-encodes I plan to do and then the Comparisons.
- Using AVS take in two video sources Original (resized version) and the newly Encoded version. Then compare the two files to find the differences.
Q. Can AVS handle multiple sources at the same time for internal manipulation?
Comparison Formula:
The basic idea of the comparison is taking the difference of the Pixel values to create an offset value. Meaning the Original sources RGB Pixel value is considered 0 then when I take the outputted pixel value from the codec it creates an Offset value, being the difference.
Example:
Original
Pixel(1,1) R=150
G=245
B=120
Codec
Pixel(1,1) R=154
G=240
B=121
The offset generated will be: R=+4 G=-5 B=+1
This will be done for the complete frame and the entire video clip. Obviously video is a moving medium the difference of a single frame is not a reliable gauge to quality. The next step will be to do this over a variables number of frames. This will be entered as a parameter to the filter I’m working on. I want to be able to compare the Average Difference created from adding the offset values of consecutive frames. Currently I’m considering setting this number to about a 1/4 of a second, either 6 or 8 frames depending on PAL/NTSC. I understand that some codecs use optical effects to increase compression that are unnoticeable to the human eye. If that is true then the average difference shouldn’t be out by to much, but it will of course introduce a difference. I’m also thinking of including (like macroblocks) averages of Width x Height, again as a parameter for complete frames.
The codec with the lowest average difference over the number of frames and complete clip would be considered the bests.
Is there any technical reason why this wouldn’t be a good form of video comparison?
I need some advice on creating an AVS Plug in, the goal of which is to create a Video Comparison tool for doing personal Codec Testing/Ratings.
Basic Premise: Take original source and covert it to the desired output resolution of the codec. Using this new version of the original source, encode with the codecs to be tested. Then use an AVS Plug-in to compare the original encoded source against the output encoded version to generate an average rating. This Average Rating will be explained below in more detail once I get a couple of questions out of the way.
Q. My first question, is Huffyuv 0.2.2.1 the best lossless codec for the job? Or is there another? I’m not too worried about the size of the outputted file as Quality is paramount to size! It must be a perfect copy of the original. Meaning if I where to compare the RGB value of every individual pixel it would be Identical (meaning the resized resolution obviously) to the original source. The reason for creating this file is two fold. I don’t want to rely on Bicubic resize doing something different if run twice. While I’m sure it would be the same, in the interest of being 100% certain it would be best to only do this once. Plus it will save CPU cycles in the long run with the mutli-encodes I plan to do and then the Comparisons.
- Using AVS take in two video sources Original (resized version) and the newly Encoded version. Then compare the two files to find the differences.
Q. Can AVS handle multiple sources at the same time for internal manipulation?
Comparison Formula:
The basic idea of the comparison is taking the difference of the Pixel values to create an offset value. Meaning the Original sources RGB Pixel value is considered 0 then when I take the outputted pixel value from the codec it creates an Offset value, being the difference.
Example:
Original
Pixel(1,1) R=150
G=245
B=120
Codec
Pixel(1,1) R=154
G=240
B=121
The offset generated will be: R=+4 G=-5 B=+1
This will be done for the complete frame and the entire video clip. Obviously video is a moving medium the difference of a single frame is not a reliable gauge to quality. The next step will be to do this over a variables number of frames. This will be entered as a parameter to the filter I’m working on. I want to be able to compare the Average Difference created from adding the offset values of consecutive frames. Currently I’m considering setting this number to about a 1/4 of a second, either 6 or 8 frames depending on PAL/NTSC. I understand that some codecs use optical effects to increase compression that are unnoticeable to the human eye. If that is true then the average difference shouldn’t be out by to much, but it will of course introduce a difference. I’m also thinking of including (like macroblocks) averages of Width x Height, again as a parameter for complete frames.
The codec with the lowest average difference over the number of frames and complete clip would be considered the bests.
Is there any technical reason why this wouldn’t be a good form of video comparison?