Hello,

the "problem" that XV does not work with SHM in some combinations

http://www.xfree86.org/pipermail/xpert/2002-February/015507.html

is also true for the very popular testxv.c program.

http://www.cs.uni-potsdam.de/~wertmann/xv/

(All Linux video players used it as startpoint, and maybe Xfree
developers too, this is the reason why I post it here)

This patch makes testxv work even with "uncommon" video
resolutions (like 350x13)

Martin


33,34c33,34
<   int         yuv_width = 640;
<   int         yuv_height = 480;
---
>   int         yuv_width = 350;
>   int         yuv_height = 13;
40c40,41
<   
---
>   int pitches;
> 
276a278,298
> 
>   printf("Bytes %d\n", yuv_image->data_size);
>   /* Pitches are >= width. They are used for "unusal" video sizes */
>   /* example 350x13 */
>   printf("Pitches");
>   pitches=yuv_image->width;
>   if (yuv_image->pitches) {
>     printf("%d\n", *yuv_image->pitches);
>     pitches=*(yuv_image->pitches);
> 
>   } else {
>     printf("0\n");
>   }
>   printf("Planes:%d\n",yuv_image->num_planes);
>   printf("Offsets");
>   if (yuv_image->offsets) {
>     printf("%d\n", *yuv_image->offsets);
>   } else {
>     printf("0\n");
>   }  
>   
278a301
> 
280c303
<       yuv_image->data[yuv_image->width*i + j] = i*j;
---
>       yuv_image->data[pitches*i + j] = j ;
281a305
>     
284c308
<   printf("%d\n", yuv_image->data_size);
---
>   


_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to