1 | static void _init_sarray_imcu_row(JSAMPIMAGE *image,JSAMPLE *src,uint32_t y_pos,uint32_t width,uint32_t rows) |
2 | {
|
3 | JSAMPLE *r0; |
4 | JSAMPLE *r1; |
5 | JSAMPARRAY ay = (*image)[0]; |
6 | JSAMPARRAY au = (*image)[1]; |
7 | JSAMPARRAY av = (*image)[2]; |
8 | JSAMPROW ry0,ru,rv,ry1; |
9 | |
10 | int i,j; |
11 | for( i = 0; i < rows/2 ;i++) |
12 | {
|
13 | r0 = & src[ (i * 2 + y_pos) * width * 2]; |
14 | r1 = & src[ (i * 2 + y_pos + 1) * width * 2]; |
15 | |
16 | ry0 = ay[i*2]; |
17 | ry1 = ay[i*2+1]; |
18 | |
19 | ru = au[i]; |
20 | rv = av[i]; |
21 | |
22 | for(j = 0; j < width /2; j++) |
23 | {
|
24 | ry0[j * 2] = r0[j*4]; |
25 | ry1[j * 2] = r1[j*4]; |
26 | ry0[j * 2 + 1] = r0[j*4+2]; |
27 | ry1[j * 2 +1] = r1[j*4+2]; |
28 | |
29 | ru[j] = (r0[ j * 4 + 1] + r1[j*4+1])/2; |
30 | rv[j] = (r0[ j * 4 + 3] + r1[j*4+3])/2; |
31 | |
32 | }
|
33 | |
34 | |
35 | }
|
36 | }
|
Lies hier: Netiquette Da stehen alle relevanten Informationen zu deinem Problem, nimm dir besonders Punkt 3 vor... Danach wäre noch Forum-Fragenformulierung interessant...
/** * \brief initial mcu rows with yuv420 data * \param image pointer to mcu row * \param src pointer of source with yuv422 format * \param y_pos the start position of the mcu rows in a whole image * \param width width of the image * \param rows total number of concerned rows in the mcu */
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.