annotate libvo/Attic/SHIT/video_out_gl.c.diff @ 1:3b5f5d1c5041

Initial revision
author arpi_esp
date Sat, 24 Feb 2001 20:28:24 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 8,10d7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 < // Hmm. Enabling this makes about 20% speedup too! (Celeron2+G400+UtahGLX)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 < //#define TEXSUBIMAGE_BUG_WORKAROUND
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 <
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 369,370c366,367
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 < static inline uint32_t
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 < draw_slice_x11(uint8_t *src[], uint32_t slice_num)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 ---
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 > //static inline uint32_t draw_slice_x11(uint8_t *src[], uint32_t slice_num)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 > static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 372,375c369,372
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 < uint8_t *dst;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 < int i;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 <
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 < dst = ImageData;// + image_width * 16 * BYTES_PP * slice_num;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 ---
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 > int i;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 > int dstride=w*BYTES_PP;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 >
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 > dstride=(dstride+15)&(~15);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 377,379c374,375
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 < yuv2rgb(dst , src[0], src[1], src[2],
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 < image_width, 16,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 < image_width*BYTES_PP, image_width, image_width/2 );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 ---
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 > yuv2rgb(ImageData, src[0], src[1], src[2],
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 > w,h, dstride, stride[0],stride[1]);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 383,384c379
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 < #ifdef TEXSUBIMAGE_BUG_WORKAROUND
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 < for(i=0;i<16;i++){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 ---
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 > for(i=0;i<h;i++){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 387,389c382,384
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 < 0, // x offset
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 < 16*slice_num+i, // y offset
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 < image_width, // width
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 ---
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 > x, // x offset
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 > y+i, // y offset
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 > w, // width
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 393c388
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 < ImageData+i*BYTES_PP*image_width ); // *pixels
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 ---
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 > ImageData+i*dstride ); // *pixels
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 395,406d389
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 < #else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 < //printf("uploading slice \n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 < glTexSubImage2D( GL_TEXTURE_2D, // target
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 < 0, // level
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 < 0, // x offset
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 < 16*slice_num, // y offset
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 < image_width, // width
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 < 16, // height
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 < (BYTES_PP==4)?GL_RGBA:GL_RGB, // format
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 < GL_UNSIGNED_BYTE, // type
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 < ImageData ); // *pixels
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 < #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 409,414d391
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 < }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 <
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 < static uint32_t
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 < draw_slice(uint8_t *src[], uint32_t slice_num)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 < {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 < return draw_slice_x11(src,slice_num);