Hello,

I'm subscribed to transcode-devel and transcode-users for about a month now 
and have not yet seen a mail in transcode-devel, so I post this here on 
transcode-users. Please tell me, if this was wrong.

On PowerPC64 you cannot define __s32 and such definitions without risking to 
redefine them, because they are already defined in linux kernel headers. The 
correct way would be using posix versions like int32_t and such.

For more information look here [1]. On Gentoo we apply a patch on all arches 
fixing this.

Would be fine to have this patch included. Unfortunatly the patch attached to 
this mail is not the patch included in gentoo, because I had to adopt it so 
it can be applied to HEAD.

Comments?

Regards,

Markus Rothe


[1] http://bugs.gentoo.org/show_bug.cgi?id=93797
diff -ruN transcode/import/nuv/import_nuv.c transcode.changed/import/nuv/import_nuv.c
--- transcode/import/nuv/import_nuv.c	2006-06-28 09:11:52.000000000 +0000
+++ transcode.changed/import/nuv/import_nuv.c	2006-07-07 19:15:38.000000000 +0000
@@ -488,7 +488,7 @@
         break;
 
       case '1':  // RTjpeg-compressed data
-        RTjpeg_decompressYUV420((__s8 *)encoded_frame, outframe->video_buf);
+        RTjpeg_decompressYUV420((int8_t *)encoded_frame, outframe->video_buf);
         break;
 
       case 'N':  // Black frame
diff -ruN transcode/import/nuv/README.rtjpeg transcode.changed/import/nuv/README.rtjpeg
--- transcode/import/nuv/README.rtjpeg	2006-06-28 09:11:52.000000000 +0000
+++ transcode.changed/import/nuv/README.rtjpeg	2006-07-07 19:20:02.000000000 +0000
@@ -82,7 +82,7 @@
 =================
 (some functions may not yet be implemented for all module types)
 
-extern void RTjpeg_init_Q(__u8 Q);
+extern void RTjpeg_init_Q(uint8_t Q);
 ----------------------------------
 Change the quality factor for future compressions/decompressions to Q.
 Q=255 ==> IJG jpeg 75% (max)
@@ -90,7 +90,7 @@
 Q=32 (min usable)
 Q=1 (abstract art)
 
-extern void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q);
+extern void RTjpeg_init_compress(uin32_t *buf, int width, int height, uint8_t Q);
 ----------------------------------------------------------------------------
 Initialise the compressor.
   *buf is a pointer to 128 ints.  The de-quantizer values are stored in this
@@ -100,13 +100,13 @@
   height is the height of the Y component of the image.
   Q is the quality factor (see above)
 
-extern void RTjpeg_init_decompress(__u32 *buf, int width, int height);
+extern void RTjpeg_init_decompress(uint32_t *buf, int width, int height);
 ----------------------------------------------------------------------
 Initialise decompressor (and color convertor).
   *buf is a pointer to the 128 ints produced by init_compress.
   width and height, as before.
 
-extern int RTjpeg_compress(__s8 *sp, unsigned char *bp);
+extern int RTjpeg_compress(int8_t *sp, unsigned char *bp);
 --------------------------------------------------------
 Compress the image.
   *sp is a pointer to the output data (for safety, this buffer should be as
@@ -114,7 +114,7 @@
   *bp is a pointer to the input data (YUV420P format).
   RETURN: the number of bytes actually used for the output stream.
 
-extern void RTjpeg_decompress(__s8 *sp, __u8 *bp);
+extern void RTjpeg_decompress(int8_t *sp, uint8_t *bp);
 --------------------------------------------------
 Decompress the image.
   as before (no RETURN).
@@ -123,7 +123,7 @@
 ----------------------------------------
 Initialise interframe compression.
 
-extern int RTjpeg_mcompress(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
+extern int RTjpeg_mcompress(int8_t *sp, unsigned char *bp, uint16_t lmask, uint16_t cmask);
 -----------------------------------------------------------------------------------
 Perform interframe compression.
  *sp, *bp as for compress
@@ -141,32 +141,32 @@
 test multiple compression factors for compressed block size. Remember to
 call mcompress with test mode = 0 BEFORE transmitting an encoded block.)
 
-extern void RTjpeg_yuvrgb(__u8 *buf, __u8 *rgb);
+extern void RTjpeg_yuvrgb(uint8_t *buf, uint8_t *rgb);
 ------------------------------------------------
 Convert decompressed YUV420P data to RGB data
   *buf pointer to YUV420P data
   *rgb pointer to RGB data
 
-extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb);
+extern void RTjpeg_yuvrgb32(uint8_t *buf, uint8_t *rgb);
 --------------------------------------------------
 convert to RGB32 data (display order)
 
-extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb);
+extern void RTjpeg_yuvrgb24(uint8_t *buf, uint8_t *rgb);
 --------------------------------------------------
 convert to RGB24 (display order)
 
-extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb);
+extern void RTjpeg_yuvrgb16(uint8_t *buf, uint8_t *rgb);
 --------------------------------------------------
 convert to RGB 565
 
-extern void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb);
+extern void RTjpeg_yuvrgb8(uint8_t *buf, uint8_t *rgb);
 -------------------------------------------------
 convert to grey-scale (grin)
 
-extern void RTjpeg_double32(__u32 *buf);
-extern void RTjpeg_double24(__u8 *buf);
-extern void RTjpeg_double16(__u16 *buf);
-extern void RTjpeg_double8(__u8 *buf);
+extern void RTjpeg_double32(uint32_t *buf);
+extern void RTjpeg_double24(uint8_t *buf);
+extern void RTjpeg_double16(uint16_t *buf);
+extern void RTjpeg_double8(uint8_t *buf);
 --------------------------------------
 convert the image pointed to by *buf to double size (size is determined by
 with and height from init_decompress).
diff -ruN transcode/import/nuv/RTjpegN.c transcode.changed/import/nuv/RTjpegN.c
--- transcode/import/nuv/RTjpegN.c	2006-06-28 09:11:52.000000000 +0000
+++ transcode.changed/import/nuv/RTjpegN.c	2006-07-07 18:51:30.000000000 +0000
@@ -54,7 +54,7 @@
 62, 55,
 63 };
 
-static const __u64 RTjpeg_aan_tab[64]={
+static const uint64_t RTjpeg_aan_tab[64]={
 4294967296ULL, 5957222912ULL, 5611718144ULL, 5050464768ULL, 4294967296ULL, 3374581504ULL, 2324432128ULL, 1184891264ULL,
 5957222912ULL, 8263040512ULL, 7783580160ULL, 7005009920ULL, 5957222912ULL, 4680582144ULL, 3224107520ULL, 1643641088ULL,
 5611718144ULL, 7783580160ULL, 7331904512ULL, 6598688768ULL, 5611718144ULL, 4408998912ULL, 3036936960ULL, 1548224000ULL,
@@ -66,16 +66,16 @@
 };
 
 #ifndef MMX
-static __s32 RTjpeg_ws[64+31];
+static int32_t RTjpeg_ws[64+31];
 #endif
-__u8 RTjpeg_alldata[2*64+4*64+4*64+4*64+4*64+32];
+uint8_t RTjpeg_alldata[2*64+4*64+4*64+4*64+4*64+32];
 
-__s16 *block; // rh
-__s16 *RTjpeg_block;
-__s32 *RTjpeg_lqt;
-__s32 *RTjpeg_cqt;
-__u32 *RTjpeg_liqt;
-__u32 *RTjpeg_ciqt;
+int16_t  *block; // rh
+int16_t  *RTjpeg_block;
+int16_t  *RTjpeg_lqt;
+int32_t  *RTjpeg_cqt;
+uint32_t *RTjpeg_liqt;
+uint32_t *RTjpeg_ciqt;
 
 unsigned char RTjpeg_lb8;
 unsigned char RTjpeg_cb8;
@@ -83,14 +83,14 @@
 int RTjpeg_Ywidth, RTjpeg_Cwidth;
 int RTjpeg_Ysize, RTjpeg_Csize;
 
-__s16 *RTjpeg_old=NULL;
+int16_t *RTjpeg_old=NULL;
 
 #ifdef MMX
 mmx_t RTjpeg_lmask;
 mmx_t RTjpeg_cmask;
 #else
-__u16 RTjpeg_lmask;
-__u16 RTjpeg_cmask;
+uint16_t RTjpeg_lmask;
+uint16_t RTjpeg_cmask;
 #endif
 int RTjpeg_mtest=0;
 
@@ -133,10 +133,10 @@
 /* Block to Stream (encoding)                         */
 /*                                                    */
 
-static int RTjpeg_b2s(__s16 *data, __s8 *strm, __u8 bt8)
+static int RTjpeg_b2s(int16_t *data, int8_t *strm, uint8_t bt8)
 {
  register int ci, co=1;
- register __s16 ZZvalue;
+ register int16_t ZZvalue;
  register unsigned char bitten;
  register unsigned char bitoff;
 
@@ -157,7 +157,7 @@
 
  // first byte allways written
 strm[0]=
-      (__u8)(data[RTjpeg_ZZ[0]]>254) ? 254:((data[RTjpeg_ZZ[0]]<0)?0:data[RTjpeg_ZZ[0]]);
+      (uint8_t)(data[RTjpeg_ZZ[0]]>254) ? 254:((data[RTjpeg_ZZ[0]]<0)?0:data[RTjpeg_ZZ[0]]);
 
 
  ci=63;
@@ -273,11 +273,11 @@
 
    if(ZZvalue>0)
    {
-     strm[co++]=(__s8)(ZZvalue>127)?127:ZZvalue;
+     strm[co++]=(int8_t)(ZZvalue>127)?127:ZZvalue;
    }
    else
    {
-     strm[co++]=(__s8)(ZZvalue<-128)?-128:ZZvalue;
+     strm[co++]=(int8_t)(ZZvalue<-128)?-128:ZZvalue;
    }
 
  }
@@ -303,7 +303,7 @@
 /* Stream to Block  (decoding)                        */
 /*                                                    */
 
-static int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl)
+static int RTjpeg_s2b(int16_t *data, int8_t *strm, uint8_t bt8, uint32_t *qtbl)
 {
  int ci;
  register int co;
@@ -313,7 +313,7 @@
 
  /* first byte always read */
  i=RTjpeg_ZZ[0];
- data[i]=((__u8)strm[0])*qtbl[i];
+ data[i]=((uint8_t)strm[0])*qtbl[i];
 
  /* we start at the behind */
 
@@ -448,10 +448,10 @@
 
 #else
 
-static int RTjpeg_b2s(__s16 *data, __s8 *strm, __u8 bt8)
+static int RTjpeg_b2s(int16_t *data, int8_t *strm, uint8_t bt8)
 {
  register int ci, co=1, tmp;
- register __s16 ZZvalue;
+ register int16_t ZZvalue;
 
 #ifdef SHOWBLOCK
 
@@ -463,7 +463,7 @@
 
 #endif
 
- (__u8)strm[0]=(__u8)(data[RTjpeg_ZZ[0]]>254) ? 254:((data[RTjpeg_ZZ[0]]<0)?0:data[RTjpeg_ZZ[0]]);
+ (uint8_t)strm[0]=(uint8_t)(data[RTjpeg_ZZ[0]]>254) ? 254:((data[RTjpeg_ZZ[0]]<0)?0:data[RTjpeg_ZZ[0]]);
 
  for(ci=1; ci<=bt8; ci++)
  {
@@ -471,11 +471,11 @@
 
    if(ZZvalue>0)
 	{
-     strm[co++]=(__s8)(ZZvalue>127)?127:ZZvalue;
+     strm[co++]=(int8_t)(ZZvalue>127)?127:ZZvalue;
    }
 	else
 	{
-     strm[co++]=(__s8)(ZZvalue<-128)?-128:ZZvalue;
+     strm[co++]=(int8_t)(ZZvalue<-128)?-128:ZZvalue;
    }
  }
 
@@ -485,11 +485,11 @@
 
   if(ZZvalue>0)
   {
-   strm[co++]=(__s8)(ZZvalue>63)?63:ZZvalue;
+   strm[co++]=(int8_t)(ZZvalue>63)?63:ZZvalue;
   }
   else if(ZZvalue<0)
   {
-   strm[co++]=(__s8)(ZZvalue<-64)?-64:ZZvalue;
+   strm[co++]=(int8_t)(ZZvalue<-64)?-64:ZZvalue;
   }
   else /* compress zeros */
   {
@@ -500,20 +500,20 @@
    }
 	while((ci<64)&&(data[RTjpeg_ZZ[ci]]==0));
 
-   strm[co++]=(__s8)(63+(ci-tmp));
+   strm[co++]=(int8_t)(63+(ci-tmp));
    ci--;
   }
  }
  return (int)co;
 }
 
-static int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl)
+static int RTjpeg_s2b(int16_t *data, int8_t *strm, uint8_t bt8, uint32_t *qtbl)
 {
  int ci=1, co=1, tmp;
  register int i;
 
  i=RTjpeg_ZZ[0];
- data[i]=((__u8)strm[0])*qtbl[i];
+ data[i]=((uint8_t)strm[0])*qtbl[i];
 
  for(co=1; co<=bt8; co++)
  {
@@ -543,19 +543,19 @@
 static void RTjpeg_quant_init(void)
 {
  int i;
- __s16 *qtbl;
+ int16_t *qtbl;
 
- qtbl=(__s16 *)RTjpeg_lqt;
- for(i=0; i<64; i++)qtbl[i]=(__s16)RTjpeg_lqt[i];
+ qtbl=(int16_t *)RTjpeg_lqt;
+ for(i=0; i<64; i++)qtbl[i]=(int16_t)RTjpeg_lqt[i];
 
- qtbl=(__s16 *)RTjpeg_cqt;
- for(i=0; i<64; i++)qtbl[i]=(__s16)RTjpeg_cqt[i];
+ qtbl=(int16_t *)RTjpeg_cqt;
+ for(i=0; i<64; i++)qtbl[i]=(int16_t)RTjpeg_cqt[i];
 }
 
 static mmx_t RTjpeg_ones=(mmx_t)(long long)0x0001000100010001LL;
 static mmx_t RTjpeg_half=(mmx_t)(long long)0x7fff7fff7fff7fffLL;
 
-static void RTjpeg_quant(__s16 *block, __s32 *qtbl)
+static void RTjpeg_quant(int16_t *block, int32_t *qtbl)
 {
  int i;
  mmx_t *bl, *ql;
@@ -596,12 +596,12 @@
 {
 }
 
-static void RTjpeg_quant(__s16 *block, __s32 *qtbl)
+static void RTjpeg_quant(int16_t *block, int32_t *qtbl)
 {
  int i;
 
  for(i=0; i<64; i++)
-   block[i]=(__s16)((block[i]*qtbl[i]+32767)>>16);
+   block[i]=(int16_t)((block[i]*qtbl[i]+32767)>>16);
 }
 #endif
 
@@ -617,14 +617,14 @@
 
 #else
 
-#define FIX_0_382683433  ((__s32)   98)		/* FIX(0.382683433) */
-#define FIX_0_541196100  ((__s32)  139)		/* FIX(0.541196100) */
-#define FIX_0_707106781  ((__s32)  181)		/* FIX(0.707106781) */
-#define FIX_1_306562965  ((__s32)  334)		/* FIX(1.306562965) */
-
-#define DESCALE10(x) (__s16)( ((x)+128) >> 8)
-#define DESCALE20(x)  (__s16)(((x)+32768) >> 16)
-#define D_MULTIPLY(var,const)  ((__s32) ((var) * (const)))
+#define FIX_0_382683433  ((int32_t)   98)		/* FIX(0.382683433) */
+#define FIX_0_541196100  ((int32_t)  139)		/* FIX(0.541196100) */
+#define FIX_0_707106781  ((int32_t)  181)		/* FIX(0.707106781) */
+#define FIX_1_306562965  ((int32_t)  334)		/* FIX(1.306562965) */
+
+#define DESCALE10(x) (int16_t)( ((x)+128) >> 8)
+#define DESCALE20(x)  (int16_t)(((x)+32768) >> 16)
+#define D_MULTIPLY(var,const)  ((int32_t) ((var) * (const)))
 #endif
 
 static void RTjpeg_dct_init(void)
@@ -633,20 +633,20 @@
 
  for(i=0; i<64; i++)
  {
-  RTjpeg_lqt[i]=(((__u64)RTjpeg_lqt[i]<<32)/RTjpeg_aan_tab[i]);
-  RTjpeg_cqt[i]=(((__u64)RTjpeg_cqt[i]<<32)/RTjpeg_aan_tab[i]);
+  RTjpeg_lqt[i]=(((uint64_t)RTjpeg_lqt[i]<<32)/RTjpeg_aan_tab[i]);
+  RTjpeg_cqt[i]=(((uint64_t)RTjpeg_cqt[i]<<32)/RTjpeg_aan_tab[i]);
  }
 }
 
-static void RTjpeg_dctY(__u8 *idata, __s16 *odata, int rskip)
+static void RTjpeg_dctY(uint8_t *idata, int16_t *odata, int rskip)
 {
 #ifndef MMX
-  __s32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  __s32 tmp10, tmp11, tmp12, tmp13;
-  __s32 z1, z2, z3, z4, z5, z11, z13;
-  __u8 *idataptr;
-  __s16 *odataptr;
-  __s32 *wsptr;
+  int32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  int32_t tmp10, tmp11, tmp12, tmp13;
+  int32_t z1, z2, z3, z4, z5, z11, z13;
+  uint8_t *idataptr;
+  int16_t *odataptr;
+  int32_t *wsptr;
   int ctr;
 
   idataptr = idata;
@@ -1543,17 +1543,17 @@
 #endif
 }
 
-#define FIX_1_082392200  ((__s32)  277)		/* FIX(1.082392200) */
-#define FIX_1_414213562  ((__s32)  362)		/* FIX(1.414213562) */
-#define FIX_1_847759065  ((__s32)  473)		/* FIX(1.847759065) */
-#define FIX_2_613125930  ((__s32)  669)		/* FIX(2.613125930) */
+#define FIX_1_082392200  ((int32_t)  277)		/* FIX(1.082392200) */
+#define FIX_1_414213562  ((int32_t)  362)		/* FIX(1.414213562) */
+#define FIX_1_847759065  ((int32_t)  473)		/* FIX(1.847759065) */
+#define FIX_2_613125930  ((int32_t)  669)		/* FIX(2.613125930) */
 
-#define DESCALE(x) (__s16)( ((x)+4) >> 3)
+#define DESCALE(x) (int16_t)( ((x)+4) >> 3)
 
 /* clip yuv to 16..235 (should be 16..240 for cr/cb but ... */
 
 #define RL(x) ((x)>235) ? 235 : (((x)<16) ? 16 : (x))
-#define MULTIPLY(var,const)  (((__s32) ((var) * (const)) + 128)>>8)
+#define MULTIPLY(var,const)  (((int32_t) ((var) * (const)) + 128)>>8)
 
 static void RTjpeg_idct_init(void)
 {
@@ -1561,12 +1561,12 @@
 
  for(i=0; i<64; i++)
  {
-  RTjpeg_liqt[i]=((__u64)RTjpeg_liqt[i]*RTjpeg_aan_tab[i])>>32;
-  RTjpeg_ciqt[i]=((__u64)RTjpeg_ciqt[i]*RTjpeg_aan_tab[i])>>32;
+  RTjpeg_liqt[i]=((uint64_t)RTjpeg_liqt[i]*RTjpeg_aan_tab[i])>>32;
+  RTjpeg_ciqt[i]=((uint64_t)RTjpeg_ciqt[i]*RTjpeg_aan_tab[i])>>32;
  }
 }
 
-static void RTjpeg_idct(__u8 *odata, __s16 *data, int rskip)
+static void RTjpeg_idct(uint8_t *odata, int16_t *data, int rskip)
 {
 #ifdef MMX
 
@@ -2560,15 +2560,15 @@
 	movq_r2m(mm3, *(dataptr));
 
 #else
-  __s32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  __s32 tmp10, tmp11, tmp12, tmp13;
-  __s32 z5, z10, z11, z12, z13;
-  __s16 *inptr;
-  __s32 *wsptr;
-  __u8 *outptr;
+  int32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  int32_t tmp10, tmp11, tmp12, tmp13;
+  int32_t z5, z10, z11, z12, z13;
+  int16_t *inptr;
+  int32_t *wsptr;
+  uint8_t *outptr;
   int ctr;
-  __s32 dcval;
-  __s32 workspace[64];
+  int32_t dcval;
+  int32_t workspace[64];
 
   inptr = data;
   wsptr = workspace;
@@ -2628,14 +2628,14 @@
     tmp5 = tmp11 - tmp6;
     tmp4 = tmp10 + tmp5;
 
-    wsptr[0] = (__s32) (tmp0 + tmp7);
-    wsptr[56] = (__s32) (tmp0 - tmp7);
-    wsptr[8] = (__s32) (tmp1 + tmp6);
-    wsptr[48] = (__s32) (tmp1 - tmp6);
-    wsptr[16] = (__s32) (tmp2 + tmp5);
-    wsptr[40] = (__s32) (tmp2 - tmp5);
-    wsptr[32] = (__s32) (tmp3 + tmp4);
-    wsptr[24] = (__s32) (tmp3 - tmp4);
+    wsptr[0] = (int32_t) (tmp0 + tmp7);
+    wsptr[56] = (int32_t) (tmp0 - tmp7);
+    wsptr[8] = (int32_t) (tmp1 + tmp6);
+    wsptr[48] = (int32_t) (tmp1 - tmp6);
+    wsptr[16] = (int32_t) (tmp2 + tmp5);
+    wsptr[40] = (int32_t) (tmp2 - tmp5);
+    wsptr[32] = (int32_t) (tmp3 + tmp4);
+    wsptr[24] = (int32_t) (tmp3 - tmp4);
 
     inptr++;
     wsptr++;
@@ -2712,15 +2712,15 @@
  dptr=dptr>>5;
  dptr=dptr<<5; /* cache align data */
 
- RTjpeg_block=(__s16 *)dptr;
- dptr+=sizeof(__s16)*64;
- RTjpeg_lqt=(__s32 *)dptr;
- dptr+=sizeof(__s32)*64;
- RTjpeg_cqt=(__s32 *)dptr;
- dptr+=sizeof(__s32)*64;
- RTjpeg_liqt=(__u32 *)dptr;
- dptr+=sizeof(__u32)*64;
- RTjpeg_ciqt=(__u32 *)dptr;
+ RTjpeg_block=(int16_t *)dptr;
+ dptr+=sizeof(int16_t)*64;
+ RTjpeg_lqt=(int32_t *)dptr;
+ dptr+=sizeof(int32_t)*64;
+ RTjpeg_cqt=(int32_t *)dptr;
+ dptr+=sizeof(int32_t)*64;
+ RTjpeg_liqt=(uint32_t *)dptr;
+ dptr+=sizeof(uint32_t)*64;
+ RTjpeg_ciqt=(uint32_t *)dptr;
 }
 
 /*
@@ -2734,18 +2734,18 @@
        Q -> quality factor (192=best, 32=worst)
 */
 
-void RTjpeg_init_Q(__u8 Q)
+void RTjpeg_init_Q(uint8_t Q)
 {
  int i;
- __u64 qual;
+ uint64_t qual;
 
- qual=(__u64)Q<<(32-7); /* 32 bit FP, 255=2, 0=0 */
+ qual=(uint64_t)Q<<(32-7); /* 32 bit FP, 255=2, 0=0 */
 
  for(i=0; i<64; i++)
  {
-  RTjpeg_lqt[i]=(__s32)((qual/((__u64)RTjpeg_lum_quant_tbl[i]<<16))>>3);
+  RTjpeg_lqt[i]=(int32_t)((qual/((uint64_t)RTjpeg_lum_quant_tbl[i]<<16))>>3);
   if(RTjpeg_lqt[i]==0)RTjpeg_lqt[i]=1;
-  RTjpeg_cqt[i]=(__s32)((qual/((__u64)RTjpeg_chrom_quant_tbl[i]<<16))>>3);
+  RTjpeg_cqt[i]=(int32_t)((qual/((uint64_t)RTjpeg_chrom_quant_tbl[i]<<16))>>3);
   if(RTjpeg_cqt[i]==0)RTjpeg_cqt[i]=1;
   RTjpeg_liqt[i]=(1<<16)/(RTjpeg_lqt[i]<<3);
   RTjpeg_ciqt[i]=(1<<16)/(RTjpeg_cqt[i]<<3);
@@ -2779,10 +2779,10 @@
 
 */
 
-void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q)
+void RTjpeg_init_compress(uint32_t *buf, int width, int height, uint8_t Q)
 {
  int i;
- __u64 qual;
+ uint64_t qual;
 
  RTjpeg_init_data();
 
@@ -2793,13 +2793,13 @@
  RTjpeg_Cwidth = RTjpeg_width>>4;
  RTjpeg_Csize= (width>>1) * height;
 
- qual=(__u64)Q<<(32-7); /* 32 bit FP, 255=2, 0=0 */
+ qual=(uint64_t)Q<<(32-7); /* 32 bit FP, 255=2, 0=0 */
 
  for(i=0; i<64; i++)
  {
-  RTjpeg_lqt[i]=(__s32)((qual/((__u64)RTjpeg_lum_quant_tbl[i]<<16))>>3);
+  RTjpeg_lqt[i]=(int32_t)((qual/((uint64_t)RTjpeg_lum_quant_tbl[i]<<16))>>3);
   if(RTjpeg_lqt[i]==0)RTjpeg_lqt[i]=1;
-  RTjpeg_cqt[i]=(__s32)((qual/((__u64)RTjpeg_chrom_quant_tbl[i]<<16))>>3);
+  RTjpeg_cqt[i]=(int32_t)((qual/((uint64_t)RTjpeg_chrom_quant_tbl[i]<<16))>>3);
   if(RTjpeg_cqt[i]==0)RTjpeg_cqt[i]=1;
   RTjpeg_liqt[i]=(1<<16)/(RTjpeg_lqt[i]<<3);
   RTjpeg_ciqt[i]=(1<<16)/(RTjpeg_cqt[i]<<3);
@@ -2823,7 +2823,7 @@
   buf[64+i]=RTjpeg_ciqt[i];
 }
 
-void RTjpeg_init_decompress(__u32 *buf, int width, int height)
+void RTjpeg_init_decompress(uint32_t *buf, int width, int height)
 {
  int i;
 
@@ -2854,12 +2854,12 @@
 // RTjpeg_color_init();
 }
 
-int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp)
+int RTjpeg_compressYUV420(int8_t *sp, unsigned char *bp)
 {
- __s8 * sb;
- register __s8 * bp1 = bp + (RTjpeg_width<<3);
- register __s8 * bp2 = bp + RTjpeg_Ysize;
- register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
+ int8_t * sb;
+ register int8_t * bp1 = bp + (RTjpeg_width<<3);
+ register int8_t * bp2 = bp + RTjpeg_Ysize;
+ register int8_t * bp3 = bp2 + (RTjpeg_Csize>>1);
  register int i, j, k;
 
 #ifdef MMX
@@ -2908,11 +2908,11 @@
  return (sp-sb);
 }
 
-int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp)
+int RTjpeg_compressYUV422(int8_t *sp, unsigned char *bp)
 {
- __s8 * sb;
- register __s8 * bp2 = bp + RTjpeg_Ysize;
- register __s8 * bp3 = bp2 + RTjpeg_Csize;
+ int8_t * sb;
+ register int8_t * bp2 = bp + RTjpeg_Ysize;
+ register int8_t * bp3 = bp2 + RTjpeg_Csize;
  register int i, j, k;
 
 #ifdef MMX
@@ -2952,9 +2952,9 @@
  return (sp-sb);
 }
 
-int RTjpeg_compress8(__s8 *sp, unsigned char *bp)
+int RTjpeg_compress8(int8_t *sp, unsigned char *bp)
 {
- __s8 * sb;
+ int8_t * sb;
  int i, j;
 
 #ifdef MMX
@@ -2980,10 +2980,10 @@
  return (sp-sb);
 }
 
-void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp)
+void RTjpeg_decompressYUV422(int8_t *sp, uint8_t *bp)
 {
- register __s8 * bp2 = bp + RTjpeg_Ysize;
- register __s8 * bp3 = bp2 + (RTjpeg_Csize);
+ register int8_t * bp2 = bp + RTjpeg_Ysize;
+ register int8_t * bp3 = bp2 + (RTjpeg_Csize);
  int i, j,k;
 
 #ifdef MMX
@@ -3028,11 +3028,11 @@
 #endif
 }
 
-void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp)
+void RTjpeg_decompressYUV420(int8_t *sp, uint8_t *bp)
 {
- register __s8 * bp1 = bp + (RTjpeg_width<<3);
- register __s8 * bp2 = bp + RTjpeg_Ysize;
- register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
+ register int8_t * bp1 = bp + (RTjpeg_width<<3);
+ register int8_t * bp2 = bp + RTjpeg_Ysize;
+ register int8_t * bp3 = bp2 + (RTjpeg_Csize>>1);
  int i, j,k;
 
 #ifdef MMX
@@ -3090,7 +3090,7 @@
 #endif
 }
 
-void RTjpeg_decompress8(__s8 *sp, __u8 *bp)
+void RTjpeg_decompress8(int8_t *sp, uint8_t *bp)
 {
  int i, j;
 
@@ -3129,7 +3129,7 @@
   tmp=(unsigned long)RTjpeg_old;
   tmp+=32;
   tmp=tmp>>5;
-  RTjpeg_old=(__s16 *)(tmp<<5);
+  RTjpeg_old=(int16_t *)(tmp<<5);
  }
  if (!RTjpeg_old)
  {
@@ -3141,7 +3141,7 @@
 
 #ifdef MMX
 
-static int RTjpeg_bcomp(__s16 *old, mmx_t *mask)
+static int RTjpeg_bcomp(int16_t *old, mmx_t *mask)
 {
  int i;
  mmx_t *mold=(mmx_t *)old;
@@ -3179,14 +3179,14 @@
  if(result.q)
  {
 //  if(!RTjpeg_mtest)
-//   for(i=0; i<16; i++)((__u64 *)old)[i]=((__u64 *)RTjpeg_block)[i];
+//   for(i=0; i<16; i++)((uint64_t *)old)[i]=((uint64_t *)RTjpeg_block)[i];
   return 0;
  }
  return 1;
 }
 
 #else
-static int RTjpeg_bcomp(__s16 *old, __u16 *mask)
+static int RTjpeg_bcomp(int16_t *old, uint16_t *mask)
 {
  int i;
 
@@ -3194,7 +3194,7 @@
   if(abs(old[i]-RTjpeg_block[i])>*mask)
   {
    if(!RTjpeg_mtest)
-    for(i=0; i<16; i++)((__u64 *)old)[i]=((__u64 *)RTjpeg_block)[i];
+    for(i=0; i<16; i++)((uint64_t *)old)[i]=((uint64_t *)RTjpeg_block)[i];
    return 0;
   }
  return 1;
@@ -3206,19 +3206,19 @@
  RTjpeg_mtest=i;
 }
 
-int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask)
+int RTjpeg_mcompressYUV420(int8_t *sp, unsigned char *bp, uint16_t lmask, uint16_t cmask)
 {
- __s8 * sb;
-//rh __s16 *block;
- register __s8 * bp1 = bp + (RTjpeg_width<<3);
- register __s8 * bp2 = bp + RTjpeg_Ysize;
- register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
+ int8_t * sb;
+//rh int16_t *block;
+ register int8_t * bp1 = bp + (RTjpeg_width<<3);
+ register int8_t * bp2 = bp + RTjpeg_Ysize;
+ register int8_t * bp3 = bp2 + (RTjpeg_Csize>>1);
  register int i, j, k;
 
 #ifdef MMX
  emms();
- RTjpeg_lmask=(mmx_t)(((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask);
- RTjpeg_cmask=(mmx_t)(((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask);
+ RTjpeg_lmask=(mmx_t)(((uint64_t)lmask<<48)|((uint64_t)lmask<<32)|((uint64_t)lmask<<16)|lmask);
+ RTjpeg_cmask=(mmx_t)(((uint64_t)cmask<<48)|((uint64_t)cmask<<32)|((uint64_t)cmask<<16)|cmask);
 #else
  RTjpeg_lmask=lmask;
  RTjpeg_cmask=cmask;
@@ -3235,7 +3235,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    block+=64;
@@ -3244,7 +3244,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    block+=64;
@@ -3253,7 +3253,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    block+=64;
@@ -3262,7 +3262,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    block+=64;
@@ -3271,7 +3271,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    block+=64;
@@ -3280,7 +3280,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    block+=64;
@@ -3298,18 +3298,18 @@
 }
 
 
-int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask)
+int RTjpeg_mcompressYUV422(int8_t *sp, unsigned char *bp, uint16_t lmask, uint64_t cmask)
 {
- __s8 * sb;
- __s16 *block;
- register __s8 * bp2;
- register __s8 * bp3;
+ int8_t * sb;
+ int16_t *block;
+ register int8_t * bp2;
+ register int8_t * bp3;
  register int i, j, k;
 
 #ifdef MMX
  emms();
- RTjpeg_lmask=(mmx_t)(((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask);
- RTjpeg_cmask=(mmx_t)(((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask);
+ RTjpeg_lmask=(mmx_t)(((uint64_t)lmask<<48)|((uint64_t)lmask<<32)|((uint64_t)lmask<<16)|lmask);
+ RTjpeg_cmask=(mmx_t)(((uint64_t)cmask<<48)|((uint64_t)cmask<<32)|((uint64_t)cmask<<16)|cmask);
 #else
  RTjpeg_lmask=lmask;
  RTjpeg_cmask=cmask;
@@ -3330,7 +3330,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    block+=64;
@@ -3339,7 +3339,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    block+=64;
@@ -3348,7 +3348,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    block+=64;
@@ -3357,7 +3357,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    }
 	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    block+=64;
@@ -3373,15 +3373,15 @@
  return (sp-sb);
 }
 
-int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask)
+int RTjpeg_mcompress8(int8_t *sp, unsigned char *bp, uint16_t lmask)
 {
- __s8 * sb;
- __s16 *block;
+ int8_t * sb;
+ int16_t *block;
  int i, j;
 
 #ifdef MMX
  emms();
- RTjpeg_lmask=(mmx_t)(((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask);
+ RTjpeg_lmask=(mmx_t)(((uint64_t)lmask<<48)|(uint64_t)lmask<<32)|((uint64_t)lmask<<16)|lmask);
 #else
  RTjpeg_lmask=lmask;
 #endif
@@ -3398,7 +3398,7 @@
    RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    {
-    *((__u8 *)sp++)=255;
+    *((uint8_t *)sp++)=255;
    } else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    block+=64;
   }
@@ -3422,12 +3422,12 @@
 #define KcbB 132252
 #define Ky 76284
 
-void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride)
+void RTjpeg_yuv422rgb(uint8_t *buf, uint8_t *rgb, int stride)
 {
  int tmp;
  int i, j;
- __s32 y, crR, crG, cbG, cbB;
- __u8 *bufcr, *bufcb, *bufy, *bufoute;
+ int32_t y, crR, crG, cbG, cbB;
+ uint8_t *bufcr, *bufcb, *bufy, *bufoute;
  int yskip;
 
  yskip=RTjpeg_width;
@@ -3470,12 +3470,12 @@
 }
 
 
-void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride)
+void RTjpeg_yuv420rgb(uint8_t *buf, uint8_t *rgb, int stride)
 {
  int tmp;
  int i, j;
- __s32 y, crR, crG, cbG, cbB;
- __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
+ int32_t y, crR, crG, cbG, cbB;
+ uint8_t *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
  int oskip, yskip;
 
  if(stride==0)
@@ -3544,12 +3544,12 @@
 }
 
 
-void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride)
+void RTjpeg_yuvrgb32(uint8_t *buf, uint8_t *rgb, int stride)
 {
  int tmp;
  int i, j;
- __s32 y, crR, crG, cbG, cbB;
- __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
+ int32_t y, crR, crG, cbG, cbB;
+ uint8_t *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
  int oskip, yskip;
 
  if(stride==0)
@@ -3620,12 +3620,12 @@
  }
 }
 
-void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride)
+void RTjpeg_yuvrgb24(uint8_t *buf, uint8_t *rgb, int stride)
 {
  int tmp;
  int i, j;
- __s32 y, crR, crG, cbG, cbB;
- __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
+ int32_t y, crR, crG, cbG, cbB;
+ uint8_t *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
  int oskip, yskip;
 
  if(stride==0)
@@ -3693,12 +3693,12 @@
  }
 }
 
-void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride)
+void RTjpeg_yuvrgb16(uint8_t *buf, uint8_t *rgb, int stride)
 {
  int tmp;
  int i, j;
- __s32 y, crR, crG, cbG, cbB;
- __u8 *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
+ int32_t y, crR, crG, cbG, cbB;
+ uint8_t *bufcr, *bufcb, *bufy, *bufoute, *bufouto;
  int oskip, yskip;
  unsigned char r, g, b;
 
@@ -3790,7 +3790,7 @@
 
 /* fix stride */
 
-void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride)
+void RTjpeg_yuvrgb8(uint8_t *buf, uint8_t *rgb, int stride)
 {
  bcopy(buf, rgb, RTjpeg_width*RTjpeg_height);
 }
diff -ruN transcode/import/nuv/RTjpegN.h transcode.changed/import/nuv/RTjpegN.h
--- transcode/import/nuv/RTjpegN.h	2006-06-28 09:11:52.000000000 +0000
+++ transcode.changed/import/nuv/RTjpegN.h	2006-07-07 18:55:37.000000000 +0000
@@ -26,37 +26,29 @@
 # include "config.h"
 #endif
 
-#ifndef _I386_TYPES_H
-typedef unsigned char __u8;
-typedef unsigned short __u16;
-typedef unsigned long __u32;
-typedef unsigned long long __u64;
-typedef signed char __s8;
-typedef signed short __s16;
-typedef signed long __s32;
-#endif
+#include <sys/types.h>
 
-extern void RTjpeg_init_Q(__u8 Q);
-extern void RTjpeg_init_compress(long unsigned int *buf, int width, int height, __u8 Q);
+extern void RTjpeg_init_Q(uint8_t Q);
+extern void RTjpeg_init_compress(long unsigned int *buf, int width, int height, uint8_t Q);
 extern void RTjpeg_init_decompress(long unsigned int *buf, int width, int height);
-extern int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp);
-extern int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp);
-extern void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp);
-extern void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp);
-extern int RTjpeg_compress8(__s8 *sp, unsigned char *bp);
-extern void RTjpeg_decompress8(__s8 *sp, __u8 *bp);
+extern int RTjpeg_compressYUV420(int8_t *sp, unsigned char *bp);
+extern int RTjpeg_compressYUV422(int8_t *sp, unsigned char *bp);
+extern void RTjpeg_decompressYUV420(int8_t *sp, uint8_t *bp);
+extern void RTjpeg_decompressYUV422(int8_t *sp, uint8_t *bp);
+extern int RTjpeg_compress8(int8_t *sp, unsigned char *bp);
+extern void RTjpeg_decompress8(int8_t *sp, uint8_t *bp);
 
 extern void RTjpeg_init_mcompress(void);
-extern int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
-extern int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
-extern int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask);
+extern int RTjpeg_mcompressYUV420(int8_t *sp, unsigned char *bp, uint16_t lmask, uint16_t cmask);
+extern int RTjpeg_mcompressYUV422(int8_t *sp, unsigned char *bp, uint16_t lmask, uint16_t cmask);
+extern int RTjpeg_mcompress8(int8_t *sp, unsigned char *bp, uint16_t lmask);
 extern void RTjpeg_set_test(int i);
 
-extern void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride);
-extern void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride);
-extern void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride);
-extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride);
-extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride);
-extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride);
+extern void RTjpeg_yuv420rgb(uint8_t *buf, uint8_t *rgb, int stride);
+extern void RTjpeg_yuv422rgb(uint8_t *buf, uint8_t *rgb, int stride);
+extern void RTjpeg_yuvrgb8(uint8_t *buf, uint8_t *rgb, int stride);
+extern void RTjpeg_yuvrgb16(uint8_t *buf, uint8_t *rgb, int stride);
+extern void RTjpeg_yuvrgb24(uint8_t *buf, uint8_t *rgb, int stride);
+extern void RTjpeg_yuvrgb32(uint8_t *buf, uint8_t *rgb, int stride);
 
 
diff -ruN transcode/import/v4l/videodev2.h transcode.changed/import/v4l/videodev2.h
--- transcode/import/v4l/videodev2.h	2006-06-28 09:11:53.000000000 +0000
+++ transcode.changed/import/v4l/videodev2.h	2006-07-07 19:14:53.000000000 +0000
@@ -20,7 +20,7 @@
 
 /*  Four-character-code (FOURCC) */
 #define v4l2_fourcc(a,b,c,d)\
-        (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
+        (((uint32_t)(a)<<0)|((uint32_t)(b)<<8)|((uint32_t)(c)<<16)|((uint32_t)(d)<<24))
 
 /*
  *	E N U M S
@@ -111,15 +111,15 @@
 };
 
 struct v4l2_rect {
-	__s32   left;
-	__s32   top;
-	__s32   width;
-	__s32   height;
+	int32_t   left;
+	int32_t   top;
+	int32_t   width;
+	int32_t   height;
 };
 
 struct v4l2_fract {
-	__u32   numerator;
-	__u32   denominator;
+	uint32_t   numerator;
+	uint32_t   denominator;
 };
 
 /*
@@ -127,12 +127,12 @@
  */
 struct v4l2_capability
 {
-	__u8	driver[16];	/* i.e. "bttv" */
-	__u8	card[32];	/* i.e. "Hauppauge WinTV" */
-	__u8	bus_info[32];	/* "PCI:" + pci_dev->slot_name */
-	__u32   version;        /* should use KERNEL_VERSION() */
-	__u32	capabilities;	/* Device capabilities */
-	__u32	reserved[4];
+	uint8_t		driver[16];	/* i.e. "bttv" */
+	uint8_t		card[32];	/* i.e. "Hauppauge WinTV" */
+	uint8_t		bus_info[32];	/* "PCI:" + pci_dev->slot_name */
+	uint32_t	version;        /* should use KERNEL_VERSION() */
+	uint32_t	capabilities;	/* Device capabilities */
+	uint32_t	reserved[4];
 };
 
 /* Values for 'capabilities' field */
@@ -156,14 +156,14 @@
 
 struct v4l2_pix_format
 {
-	__u32         	 	width;
-	__u32	         	height;
-	__u32	         	pixelformat;
+	uint32_t		width;
+	uint32_t		height;
+	uint32_t		pixelformat;
 	enum v4l2_field  	field;
-	__u32            	bytesperline;	/* for padding, zero if unused */
-	__u32          	 	sizeimage;
+	uint32_t            	bytesperline;	/* for padding, zero if unused */
+	uint32_t		sizeimage;
         enum v4l2_colorspace	colorspace;
-	__u32			priv;		/* private data, depends on pixelformat */
+	uint32_t		priv;		/* private data, depends on pixelformat */
 };
 
 /*           Pixel format    FOURCC                  depth  Description   */
@@ -209,12 +209,12 @@
  */
 struct v4l2_fmtdesc
 {
-	__u32	            index;             /* Format number      */
-	enum v4l2_buf_type  type;              /* buffer type        */
-	__u32               flags;
-	__u8	            description[32];   /* Description string */
-	__u32	            pixelformat;       /* Format fourcc      */
-	__u32	            reserved[4];
+	uint32_t		index;			/* Format number      */
+	enum v4l2_buf_type	type;			/* buffer type        */
+	uint32_t		flags;
+	uint8_t			description[32];	/* Description string */
+	uint32_t		pixelformat;		/* Format fourcc      */
+	uint32_t		reserved[4];
 };
 
 #define V4L2_FMT_FLAG_COMPRESSED 0x0001
@@ -225,13 +225,13 @@
  */
 struct v4l2_timecode
 {
-	__u32	type;
-	__u32	flags;
-	__u8	frames;
-	__u8	seconds;
-	__u8	minutes;
-	__u8	hours;
-	__u8	userbits[4];
+	uint32_t	type;
+	uint32_t	flags;
+	uint8_t		frames;
+	uint8_t		seconds;
+	uint8_t		minutes;
+	uint8_t		hours;
+	uint8_t		userbits[4];
 };
 
 /*  Type  */
@@ -259,10 +259,10 @@
  * ### later ... */
 struct v4l2_compression
 {
-	__u32	quality;
-	__u32	keyframerate;
-	__u32	pframerate;
-	__u32	reserved[5];
+	uint32_t	quality;
+	uint32_t	keyframerate;
+	uint32_t	pframerate;
+	uint32_t	reserved[5];
 };
 #endif
 
@@ -278,7 +278,7 @@
 	int  COM_len;           /* Length of data in JPEG COM segment */
 	char COM_data[60];      /* Data in JPEG COM segment */
 
-	__u32 jpeg_markers;     /* Which markers should go into the JPEG
+	uint32_t jpeg_markers;     /* Which markers should go into the JPEG
 				 * output. Unless you exactly know what
 				 * you do, leave them untouched.
 				 * Inluding less markers will make the
@@ -302,32 +302,32 @@
  */
 struct v4l2_requestbuffers
 {
-	__u32	                count;
+	uint32_t	                count;
 	enum v4l2_buf_type      type;
 	enum v4l2_memory        memory;
-	__u32	                reserved[2];
+	uint32_t	                reserved[2];
 };
 
 struct v4l2_buffer
 {
-	__u32			index;
+	uint32_t			index;
 	enum v4l2_buf_type      type;
-	__u32			bytesused;
-	__u32			flags;
+	uint32_t			bytesused;
+	uint32_t			flags;
 	enum v4l2_field		field;
 	struct timeval		timestamp;
 	struct v4l2_timecode	timecode;
-	__u32			sequence;
+	uint32_t			sequence;
 
 	/* memory location */
-	enum v4l2_memory        memory;
+	enum v4l2_memory	memory;
 	union {
-		__u32           offset;
-		unsigned long   userptr;
+		uint32_t	offset;
+		unsigned long	userptr;
 	} m;
-	__u32			length;
+	uint32_t			length;
 
-	__u32			reserved[2];
+	uint32_t			reserved[2];
 };
 
 /*  Flags for 'flags' field */
@@ -344,11 +344,11 @@
  */
 struct v4l2_framebuffer
 {
-	__u32			capability;
-	__u32			flags;
+	uint32_t		capability;
+	uint32_t		flags;
 /* FIXME: in theory we should pass something like PCI device + memory
  * region + offset instead of some physical address */
-	void*                   base;
+	void*			base;
 	struct v4l2_pix_format	fmt;
 };
 /*  Flags for the 'capability' field. Read only */
@@ -371,9 +371,9 @@
 {
 	struct v4l2_rect        w;
 	enum v4l2_field  	field;
-	__u32			chromakey;
+	uint32_t			chromakey;
 	struct v4l2_clip	*clips;
-	__u32			clipcount;
+	uint32_t			clipcount;
 	void			*bitmap;
 };
 
@@ -383,12 +383,12 @@
  */
 struct v4l2_captureparm
 {
-	__u32		   capability;	  /*  Supported modes */
-	__u32		   capturemode;	  /*  Current mode */
+	uint32_t		   capability;	  /*  Supported modes */
+	uint32_t		   capturemode;	  /*  Current mode */
 	struct v4l2_fract  timeperframe;  /*  Time per frame in .1us units */
-	__u32		   extendedmode;  /*  Driver-specific extensions */
-	__u32              readbuffers;   /*  # of buffers for read */
-	__u32		   reserved[4];
+	uint32_t		   extendedmode;  /*  Driver-specific extensions */
+	uint32_t              readbuffers;   /*  # of buffers for read */
+	uint32_t		   reserved[4];
 };
 /*  Flags for 'capability' and 'capturemode' fields */
 #define V4L2_MODE_HIGHQUALITY	0x0001	/*  High quality imaging mode */
@@ -396,12 +396,12 @@
 
 struct v4l2_outputparm
 {
-	__u32		   capability;	 /*  Supported modes */
-	__u32		   outputmode;	 /*  Current mode */
-	struct v4l2_fract  timeperframe; /*  Time per frame in seconds */
-	__u32		   extendedmode; /*  Driver-specific extensions */
-	__u32              writebuffers; /*  # of buffers for write */
-	__u32		   reserved[4];
+	uint32_t		capability;	/*  Supported modes */
+	uint32_t		outputmode;	/*  Current mode */
+	struct v4l2_fract	timeperframe;	/*  Time per frame in seconds */
+	uint32_t		extendedmode;	/*  Driver-specific extensions */
+	uint32_t		writebuffers;	/*  # of buffers for write */
+	uint32_t		reserved[4];
 };
 
 /*
@@ -424,7 +424,7 @@
  *      A N A L O G   V I D E O   S T A N D A R D
  */
 
-typedef __u64 v4l2_std_id;
+typedef uint64_t v4l2_std_id;
 
 /* one bit for each */
 #define V4L2_STD_PAL_B          ((v4l2_std_id)0x00000001)
@@ -491,12 +491,12 @@
 
 struct v4l2_standard
 {
-	__u32	       	     index;
-	v4l2_std_id          id;
-	__u8		     name[24];
-	struct v4l2_fract    frameperiod; /* Frames, not fields */
-	__u32		     framelines;
-	__u32		     reserved[4];
+	uint32_t		index;
+	v4l2_std_id		id;
+	uint8_t			name[24];
+	struct v4l2_fract	frameperiod; /* Frames, not fields */
+	uint32_t		framelines;
+	uint32_t		reserved[4];
 };
 
 
@@ -505,14 +505,14 @@
  */
 struct v4l2_input
 {
-	__u32	     index;		/*  Which input */
-	__u8	     name[32];	        /*  Label */
-	__u32	     type;		/*  Type of input */
-	__u32	     audioset;	        /*  Associated audios (bitfield) */
-	__u32        tuner;             /*  Associated tuner */
-	v4l2_std_id  std;
-	__u32	     status;
-	__u32	     reserved[4];
+	uint32_t	index;		/*  Which input */
+	uint8_t		name[32];	/*  Label */
+	uint32_t	type;		/*  Type of input */
+	uint32_t	audioset;	/*  Associated audios (bitfield) */
+	uint32_t	tuner;		/*  Associated tuner */
+	v4l2_std_id	std;
+	uint32_t	status;
+	uint32_t	reserved[4];
 };
 /*  Values for the 'type' field */
 #define V4L2_INPUT_TYPE_TUNER		1
@@ -542,13 +542,13 @@
  */
 struct v4l2_output
 {
-	__u32	     index;		/*  Which output */
-	__u8	     name[32];	        /*  Label */
-	__u32	     type;		/*  Type of output */
-	__u32	     audioset;	        /*  Associated audios (bitfield) */
-	__u32	     modulator;         /*  Associated modulator */
-	v4l2_std_id  std;
-	__u32	     reserved[4];
+	uint32_t	index;		/*  Which output */
+	uint8_t		name[32];	/*  Label */
+	uint32_t	type;		/*  Type of output */
+	uint32_t	audioset;	/*  Associated audios (bitfield) */
+	uint32_t	modulator;	/*  Associated modulator */
+	v4l2_std_id	std;
+	uint32_t	reserved[4];
 };
 /*  Values for the 'type' field */
 #define V4L2_OUTPUT_TYPE_MODULATOR		1
@@ -560,31 +560,31 @@
  */
 struct v4l2_control
 {
-	__u32		     id;
-	__s32		     value;
+	uint32_t	id;
+	int32_t		value;
 };
 
 /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
 struct v4l2_queryctrl
 {
-	__u32	             id;
-	enum v4l2_ctrl_type  type;
-	__u8		     name[32];	/* Whatever */
-	__s32		     minimum;	/* Note signedness */
-	__s32		     maximum;
-	__s32	             step;
-	__s32		     default_value;
-	__u32                flags;
-	__u32		     reserved[2];
+	uint32_t		id;
+	enum v4l2_ctrl_type	type;
+	uint8_t			name[32];	/* Whatever */
+	int32_t			minimum;	/* Note signedness */
+	int32_t			maximum;
+	int32_t			step;
+	int32_t			default_value;
+	uint32_t		flags;
+	uint32_t		reserved[2];
 };
 
 /*  Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
 struct v4l2_querymenu
 {
-	__u32		id;
-	__u32		index;
-	__u8		name[32];	/* Whatever */
-	__u32		reserved;
+	uint32_t		id;
+	uint32_t		index;
+	uint8_t			name[32];	/* Whatever */
+	uint32_t		reserved;
 };
 
 /*  Control flags  */
@@ -627,28 +627,28 @@
  */
 struct v4l2_tuner
 {
-	__u32                   index;
-	__u8			name[32];
-	enum v4l2_tuner_type    type;
-	__u32			capability;
-	__u32			rangelow;
-	__u32			rangehigh;
-	__u32			rxsubchans;
-	__u32			audmode;
-	__s32			signal;
-	__s32			afc;
-	__u32			reserved[4];
+	uint32_t		index;
+	uint8_t			name[32];
+	enum v4l2_tuner_type	type;
+	uint32_t		capability;
+	uint32_t		rangelow;
+	uint32_t		rangehigh;
+	uint32_t		rxsubchans;
+	uint32_t		audmode;
+	int32_t			signal;
+	int32_t			afc;
+	uint32_t		reserved[4];
 };
 
 struct v4l2_modulator
 {
-	__u32			index;
-	__u8			name[32];
-	__u32			capability;
-	__u32			rangelow;
-	__u32			rangehigh;
-	__u32			txsubchans;
-	__u32			reserved[4];
+	uint32_t		index;
+	uint8_t			name[32];
+	uint32_t		capability;
+	uint32_t		rangelow;
+	uint32_t		rangehigh;
+	uint32_t		txsubchans;
+	uint32_t		reserved[4];
 };
 
 /*  Flags for the 'capability' field */
@@ -675,10 +675,10 @@
 
 struct v4l2_frequency
 {
-	__u32	              tuner;
-	enum v4l2_tuner_type  type;
-        __u32	              frequency;
-	__u32	              reserved[8];
+	uint32_t		tuner;
+	enum v4l2_tuner_type	type;
+        uint32_t		frequency;
+	uint32_t		reserved[8];
 };
 
 /*
@@ -686,11 +686,11 @@
  */
 struct v4l2_audio
 {
-	__u32	index;
-	__u8	name[32];
-	__u32	capability;
-	__u32	mode;
-	__u32	reserved[2];
+	uint32_t	index;
+	uint8_t		name[32];
+	uint32_t	capability;
+	uint32_t	mode;
+	uint32_t	reserved[2];
 };
 /*  Flags for the 'capability' field */
 #define V4L2_AUDCAP_STEREO		0x00001
@@ -701,11 +701,11 @@
 
 struct v4l2_audioout
 {
-	__u32	index;
-	__u8	name[32];
-	__u32	capability;
-	__u32	mode;
-	__u32	reserved[2];
+	uint32_t	index;
+	uint8_t		name[32];
+	uint32_t	capability;
+	uint32_t	mode;
+	uint32_t	reserved[2];
 };
 
 /*
@@ -716,14 +716,14 @@
 
 struct v4l2_vbi_format
 {
-	__u32	sampling_rate;		/* in 1 Hz */
-	__u32	offset;
-	__u32	samples_per_line;
-	__u32	sample_format;		/* V4L2_PIX_FMT_* */
-	__s32	start[2];
-	__u32	count[2];
-	__u32	flags;			/* V4L2_VBI_* */
-	__u32	reserved[2];		/* must be zero */
+	uint32_t	sampling_rate;		/* in 1 Hz */
+	uint32_t	offset;
+	uint32_t	samples_per_line;
+	uint32_t	sample_format;		/* V4L2_PIX_FMT_* */
+	int32_t		start[2];
+	uint32_t	count[2];
+	uint32_t	flags;			/* V4L2_VBI_* */
+	uint32_t	reserved[2];		/* must be zero */
 };
 
 /*  VBI flags  */
@@ -745,7 +745,7 @@
 		struct v4l2_pix_format	pix;  // V4L2_BUF_TYPE_VIDEO_CAPTURE
 		struct v4l2_window	win;  // V4L2_BUF_TYPE_VIDEO_OVERLAY
 		struct v4l2_vbi_format	vbi;  // V4L2_BUF_TYPE_VBI_CAPTURE
-		__u8	raw_data[200];        // user-defined
+		uint8_t	raw_data[200];        // user-defined
 	} fmt;
 };
 
@@ -759,7 +759,7 @@
 	{
 		struct v4l2_captureparm	capture;
 		struct v4l2_outputparm	output;
-		__u8	raw_data[200];  /* user-defined */
+		uint8_t	raw_data[200];  /* user-defined */
 	} parm;
 };
 
diff -ruN transcode/import/v4l/videodev.h transcode.changed/import/v4l/videodev.h
--- transcode/import/v4l/videodev.h	2006-06-28 09:11:53.000000000 +0000
+++ transcode.changed/import/v4l/videodev.h	2006-07-07 19:00:07.000000000 +0000
@@ -36,13 +36,13 @@
 	int channel;
 	char name[32];
 	int tuners;
-	__u32  flags;
+	uint32_t  flags;
 #define VIDEO_VC_TUNER		1	/* Channel has a tuner */
 #define VIDEO_VC_AUDIO		2	/* Channel has audio */
-	__u16  type;
+	uint16_t  type;
 #define VIDEO_TYPE_TV		1
 #define VIDEO_TYPE_CAMERA	2
-	__u16 norm;			/* Norm set by channel */
+	uint16_t norm;			/* Norm set by channel */
 };
 
 struct video_tuner
@@ -50,7 +50,7 @@
 	int tuner;
 	char name[32];
 	unsigned long rangelow, rangehigh;	/* Tuner range */
-	__u32 flags;
+	uint32_t flags;
 #define VIDEO_TUNER_PAL		1
 #define VIDEO_TUNER_NTSC	2
 #define VIDEO_TUNER_SECAM	4
@@ -59,23 +59,23 @@
 #define VIDEO_TUNER_STEREO_ON	128	/* Tuner is seeing stereo */
 #define VIDEO_TUNER_RDS_ON      256     /* Tuner is seeing an RDS datastream */
 #define VIDEO_TUNER_MBS_ON      512     /* Tuner is seeing an MBS datastream */
-	__u16 mode;			/* PAL/NTSC/SECAM/OTHER */
+	uint16_t mode;			/* PAL/NTSC/SECAM/OTHER */
 #define VIDEO_MODE_PAL		0
 #define VIDEO_MODE_NTSC		1
 #define VIDEO_MODE_SECAM	2
 #define VIDEO_MODE_AUTO		3
-	__u16 signal;			/* Signal strength 16bit scale */
+	uint16_t signal;			/* Signal strength 16bit scale */
 };
 
 struct video_picture
 {
-	__u16	brightness;
-	__u16	hue;
-	__u16	colour;
-	__u16	contrast;
-	__u16	whiteness;	/* Black and white only */
-	__u16	depth;		/* Capture depth */
-	__u16   palette;	/* Palette in use */
+	uint16_t	brightness;
+	uint16_t	hue;
+	uint16_t	colour;
+	uint16_t	contrast;
+	uint16_t	whiteness;	/* Black and white only */
+	uint16_t	depth;		/* Capture depth */
+	uint16_t   palette;	/* Palette in use */
 #define VIDEO_PALETTE_GREY	1	/* Linear greyscale */
 #define VIDEO_PALETTE_HI240	2	/* High 240 cube (BT848) */
 #define VIDEO_PALETTE_RGB565	3	/* 565 16 bit RGB */
@@ -98,43 +98,43 @@
 
 struct video_audio
 {
-	int	audio;		/* Audio channel */
-	__u16	volume;		/* If settable */
-	__u16	bass, treble;
-	__u32	flags;
+	int		audio;		/* Audio channel */
+	uint16_t	volume;		/* If settable */
+	uint16_t	bass, treble;
+	uint32_t	flags;
 #define VIDEO_AUDIO_MUTE	1
 #define VIDEO_AUDIO_MUTABLE	2
 #define VIDEO_AUDIO_VOLUME	4
 #define VIDEO_AUDIO_BASS	8
 #define VIDEO_AUDIO_TREBLE	16
 #define VIDEO_AUDIO_BALANCE	32
-	char    name[16];
+	char		name[16];
 #define VIDEO_SOUND_MONO	1
 #define VIDEO_SOUND_STEREO	2
 #define VIDEO_SOUND_LANG1	4
 #define VIDEO_SOUND_LANG2	8
-        __u16   mode;
-        __u16	balance;	/* Stereo balance */
-        __u16	step;		/* Step actual volume uses */
+        uint16_t	mode;
+        uint16_t	balance;	/* Stereo balance */
+        uint16_t	step;		/* Step actual volume uses */
 };
 
 struct video_clip
 {
-	__s32	x,y;
-	__s32	width, height;
+	int32_t	x,y;
+	int32_t	width, height;
 	struct	video_clip *next;	/* For user use/driver use only */
 };
 
 struct video_window
 {
-	__u32	x,y;			/* Position of window */
-	__u32	width,height;		/* Its size */
-	__u32	chromakey;
-	__u32	flags;
-	struct	video_clip *clips;	/* Set only */
-	int	clipcount;
+	uint32_t	x,y;		/* Position of window */
+	uint32_t	width,height;	/* Its size */
+	uint32_t	chromakey;
+	uint32_t	flags;
+	struct		video_clip *clips;	/* Set only */
+	int		clipcount;
 #define VIDEO_WINDOW_INTERLACE	1
-#define VIDEO_WINDOW_CHROMAKEY	16	/* Overlay by chromakey */
+#define VIDEO_WINDOW_CHROMAKEY	16		/* Overlay by chromakey */
 #define VIDEO_CLIP_BITMAP	-1
 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */
 #define VIDEO_CLIPMAP_SIZE	(128 * 625)
@@ -142,10 +142,10 @@
 
 struct video_capture
 {
-	__u32 	x,y;			/* Offsets into image */
-	__u32	width, height;		/* Area to capture */
-	__u16	decimation;		/* Decimation divider */
-	__u16	flags;			/* Flags for capture */
+	uint32_t 	x,y;			/* Offsets into image */
+	uint32_t	width, height;		/* Area to capture */
+	uint16_t	decimation;		/* Decimation divider */
+	uint16_t	flags;			/* Flags for capture */
 #define VIDEO_CAPTURE_ODD		0	/* Temporal */
 #define VIDEO_CAPTURE_EVEN		1
 };
@@ -167,8 +167,8 @@
 
 struct video_key
 {
-	__u8	key[8];
-	__u32	flags;
+	uint8_t	key[8];
+	uint32_t	flags;
 };
 
 
@@ -195,12 +195,12 @@
 };
 
 struct vbi_format {
-	__u32	sampling_rate;	/* in Hz */
-	__u32	samples_per_line;
-	__u32	sample_format;	/* VIDEO_PALETTE_RAW only (1 byte) */
-	__s32	start[2];	/* starting line for each frame */
-	__u32	count[2];	/* count of lines for each frame */
-	__u32	flags;
+	uint32_t	sampling_rate;	/* in Hz */
+	uint32_t	samples_per_line;
+	uint32_t	sample_format;	/* VIDEO_PALETTE_RAW only (1 byte) */
+	int32_t		start[2];	/* starting line for each frame */
+	uint32_t	count[2];	/* count of lines for each frame */
+	uint32_t	flags;
 #define	VBI_UNSYNC	1	/* can distingues between top/bottom field */
 #define	VBI_INTERLACED	2	/* lines are interlaced */
 };
@@ -209,13 +209,13 @@
 /* but it could apply generically to any hardware compressor/decompressor */
 struct video_info
 {
-	__u32	frame_count;	/* frames output since decode/encode began */
-	__u32	h_size;		/* current unscaled horizontal size */
-	__u32	v_size;		/* current unscaled veritcal size */
-	__u32	smpte_timecode;	/* current SMPTE timecode (for current GOP) */
-	__u32	picture_type;	/* current picture type */
-	__u32	temporal_reference;	/* current temporal reference */
-	__u8	user_data[256];	/* user data last found in compressed stream */
+	uint32_t	frame_count;	/* frames output since decode/encode began */
+	uint32_t	h_size;		/* current unscaled horizontal size */
+	uint32_t	v_size;		/* current unscaled veritcal size */
+	uint32_t	smpte_timecode;	/* current SMPTE timecode (for current GOP) */
+	uint32_t	picture_type;	/* current picture type */
+	uint32_t	temporal_reference;	/* current temporal reference */
+	uint8_t		user_data[256];	/* user data last found in compressed stream */
 	/* user_data[0] contains user data flags, user_data[1] has count */
 };
 
@@ -232,7 +232,7 @@
 {
 	char	loadwhat[16];	/* name or tag of file being passed */
 	int	datasize;
-	__u8	*data;
+	uint8_t	*data;
 };
 
 #define VIDIOCGCAP		_IOR('v',1,struct video_capability)	/* Get capabilities */

Reply via email to