The unsigned [EDIT: signed] bytes I am used to (aka __int8, char) have a range from -128 to +127.
https://msdn.microsoft.com/en-us/library/s3f49ktz.aspx
Not real good for video work.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 61 to 71 of 71
Thread
-
Last edited by raffriff42; 20th Feb 2017 at 01:42.
-
Last edited by jagabo; 19th Feb 2017 at 19:12.
-
So raffriff, would you be willing to re-run your code using unsigned bytes (0 to 255)?
-
The test was run with unsigned bytes. I edited post #61 above to clarify.
In post #55, BYTE is a typedef (alternate name) for unsigned char; see Windows Data Types.
By the way I added a count of total errors to see how many colors were out by 1 or more. The answer was four.Last edited by raffriff42; 20th Feb 2017 at 02:13.
-
-
I compiled riffraff42's code from post #55 and added an error count and got:
Code:Colors tested: 16387064 Errors: 13821768 Maximum red error: 1 Maximum green error: 2 Maximum blue error: 1
-
If the error can be held to +/- 1 no matter how frequently it occurs, that's good enough for me. You're going to have that error when you use division with integers.
why are you guys testing from 1 to 254 instead of 0 to 255? -
Ah, think I see what your problem was. If you ran a loop like:
Code:unsigned char R1; for (R1=0; R1<=255; R1++) { // blah }
Code:unsigned char R1; unsigned char r; for (int r=0; r<=255; r++) { R1 = r; // blah }
Similar Threads
-
ffmpeg/x264 RGB to YUV
By SameSelf in forum Video ConversionReplies: 40Last Post: 14th Nov 2016, 18:40 -
YUV/ RGB problem in Avisynth
By spiritt in forum Newbie / General discussionsReplies: 9Last Post: 6th Sep 2015, 04:31 -
is this YUV or RGB?
By marcorocchini in forum Newbie / General discussionsReplies: 2Last Post: 20th Apr 2014, 10:21 -
MENCODER: how to convert from YUV to RGB?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 19th Dec 2013, 13:24 -
YUV 4:2:0 to RGB
By toshyuki in forum ProgrammingReplies: 15Last Post: 8th Oct 2012, 12:12