YV12 to reduced grayscale convertion function and a bmp buffer compare function
€30-250 EUR
Closed
Posted over 9 years ago
€30-250 EUR
Paid on delivery
Develop an optimised (SSE4, AVX intrinsics) C++ function that extracts the luminance channel out of a YUV12 encoded bitmap buffer. It must be possible to reduce the grayscale levels to 4,8,16,32 or 64 based on an input parameter. if grayscale levels are reduced, the new level should be calculated like this:
newlevel = ((oldlevel mod maxlevels) * maxlevels) + (maxlevels mod 2)
example = (121 mod 32) * 32 + (32 / 2) = 3 * 32 + 16 = 112
The function must be developed in a way that it can be invoked from a .net application and the resulting buffer can be used as buffer for a [login to view URL] Buffer.
PInvoke import sample:
[DllImport("[login to view URL]", CallingConvention = [login to view URL], EntryPoint = "ConvertYV12toGrayscale")]
internal static extern int ConvertYV12toGrayscale(int sourceWidth, int sourceHeight, int sourceStride, IntPtr sourcebuffer, int sourcesize, IntPtr targetbuffer, int targetsize, int dst_stride, int levels);
Buffer to Bitmap convertion sample:
var bmp = new Bitmap(720, 576, [login to view URL]);
var bmpdata = [login to view URL](new Rectangle(0, 0, 720, 576), [login to view URL], [login to view URL]);
var result = [login to view URL](720, 576, 720, (IntPtr) pbuffer, (int)bufsize, [login to view URL], [login to view URL] * [login to view URL], [login to view URL]); [login to view URL](bmpdata);
[login to view URL]();
A second function needs to be developed (also requires .net interface) that compares two bitmap buffers of same size on a per pixel base. The function must return the number of pixels that are not identical. Input parameters are width, height, stride, buffer1 ptr, buffer2 ptr, buf1 size, buf2 size)
Other:
The source code must be well documented. A MS Visual Studio 2010-2013 solution with sample c# app to open end convert the attached raw buffer & run a compare against another buffer must be included. (Buffer size of sample is 720*576)
Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work! Ready to start work!
I am currently studying to become a computer engineer at Lunds University in Sweden. I have much experience of C# and Java and have quite extensive knowledge of image manipulation.
At my spare time I've been programming in C and I recently completed a course in C++. I have experience in using visual studio and have access to both visual studio 2010 and 2013.
I am eager to show of my skills as I am new to this site.
During my studies I've been working remotly and before my studies I have 2 years of web developing experience.
I have 4.5 year of Experience in .Net and SQL Server, i had develop some web and desktop based Application.
Recently i have completed image compression work in freelancer.