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