Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 41498 Details for
Bug 66949
gdm puts unexecutable .c source file in /etc/X11/Xsession
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
emerged /usr/portage/gnome-base/gdm/files/2.6.0/Xsession
Xsession (text/plain), 6.05 KB, created by
texon
on 2004-10-10 20:16:34 UTC
(
hide
)
Description:
emerged /usr/portage/gnome-base/gdm/files/2.6.0/Xsession
Filename:
MIME Type:
Creator:
texon
Created:
2004-10-10 20:16:34 UTC
Size:
6.05 KB
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <string.h> > >#include "../config.h" >#include "../mp_msg.h" >#include "../cpudetect.h" > >#include "img_format.h" >#include "mp_image.h" >#include "vf.h" > >#include "../libvo/fastmemcpy.h" > > >struct metrics { > /* difference: total, even lines, odd lines */ > int d, e, o; > /* noise: temporal, spacial (current), spacial (past) */ > int t, s, p; >}; > >struct frameinfo { > /* peak, relative, mean */ > struct metrics p, r, m; >}; > >struct vf_priv_s { > struct frameinfo fi[2]; > mp_image_t *dmpi; > int first; > int drop, lastdrop, dropnext; > int inframes, outframes; >}; > >enum { > F_DROP, > F_MERGE, > F_NEXT, > F_SHOW >}; > >static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int height, int dstStride, int srcStride) >{ > int i; > void *retval=dst; > > for(i=0; i<height; i++) > { > memcpy(dst, src, bytesPerLine); > src+= srcStride; > dst+= dstStride; > } > > return retval; >} > >#ifdef HAVE_MMX >static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char *new, int os, int ns) >{ > int i; > short out[24]; // output buffer for the partial metrics from the mmx code > > asm ( > "movl $4, %%ecx \n\t" > "pxor %%mm4, %%mm4 \n\t" // 4 even difference sums > "pxor %%mm5, %%mm5 \n\t" // 4 odd difference sums > "pxor %%mm7, %%mm7 \n\t" // all zeros > > ".balign 16 \n\t" > "1: \n\t" > > // Even difference > "movq (%%esi), %%mm0 \n\t" > "movq (%%esi), %%mm2 \n\t" > "addl %%eax, %%esi \n\t" > "movq (%%edi), %%mm1 \n\t" > "addl %%ebx, %%edi \n\t" > "psubusb %%mm1, %%mm2 \n\t" > "psubusb %%mm0, %%mm1 \n\t" > "movq %%mm2, %%mm0 \n\t" > "movq %%mm1, %%mm3 \n\t" > "punpcklbw %%mm7, %%mm0 \n\t" > "punpcklbw %%mm7, %%mm1 \n\t" > "punpckhbw %%mm7, %%mm2 \n\t" > "punpckhbw %%mm7, %%mm3 \n\t" > "paddw %%mm0, %%mm4 \n\t" > "paddw %%mm1, %%mm4 \n\t" > "paddw %%mm2, %%mm4 \n\t" > "paddw %%mm3, %%mm4 \n\t" > > // Odd difference > "movq (%%esi), %%mm0 \n\t" > "movq (%%esi), %%mm2 \n\t" > "addl %%eax, %%esi \n\t" > "movq (%%edi), %%mm1 \n\t" > "addl %%ebx, %%edi \n\t" > "psubusb %%mm1, %%mm2 \n\t" > "psubusb %%mm0, %%mm1 \n\t" > "movq %%mm2, %%mm0 \n\t" > "movq %%mm1, %%mm3 \n\t" > "punpcklbw %%mm7, %%mm0 \n\t" > "punpcklbw %%mm7, %%mm1 \n\t" > "punpckhbw %%mm7, %%mm2 \n\t" > "punpckhbw %%mm7, %%mm3 \n\t" > "paddw %%mm0, %%mm5 \n\t" > "paddw %%mm1, %%mm5 \n\t" > "paddw %%mm2, %%mm5 \n\t" > "paddw %%mm3, %%mm5 \n\t" > > "decl %%ecx \n\t" > "jnz 1b \n\t" > "movq %%mm4, (%%edx) \n\t" > "movq %%mm5, 8(%%edx) \n\t" > : > : "S" (old), "D" (new), "a" (os), "b" (ns), "d" (out) > : "memory" > ); > m->e = out[0]+out[1]+out[2]+out[3]; > m->o = out[4]+out[5]+out[6]+out[7]; > m->d = m->e + m->o; > > asm ( > // First loop to measure first four columns > "movl $4, %%ecx \n\t" > "pxor %%mm4, %%mm4 \n\t" // Past spacial noise > "pxor %%mm5, %%mm5 \n\t" // Temporal noise > "pxor %%mm6, %%mm6 \n\t" // Current spacial noise > > ".balign 16 \n\t" > "2: \n\t" > > "movq (%%esi), %%mm0 \n\t" > "movq (%%esi,%%eax), %%mm1 \n\t" > "addl %%eax, %%esi \n\t" > "addl %%eax, %%esi \n\t" > "movq (%%edi), %%mm2 \n\t" > "movq (%%edi,%%ebx), %%mm3 \n\t" > "addl %%ebx, %%edi \n\t" > "addl %%ebx, %%edi \n\t" > "punpcklbw %%mm7, %%mm0 \n\t" > "punpcklbw %%mm7, %%mm1 \n\t" > "punpcklbw %%mm7, %%mm2 \n\t" > "punpcklbw %%mm7, %%mm3 \n\t" > "paddw %%mm1, %%mm4 \n\t" > "paddw %%mm1, %%mm5 \n\t" > "paddw %%mm3, %%mm6 \n\t" > "psubw %%mm0, %%mm4 \n\t" > "psubw %%mm2, %%mm5 \n\t" > "psubw %%mm2, %%mm6 \n\t" > > "decl %%ecx \n\t" > "jnz 2b \n\t" > > "movq %%mm0, %%mm1 \n\t" > "movq %%mm0, %%mm2 \n\t" > "movq %%mm0, %%mm3 \n\t" > "pcmpgtw %%mm4, %%mm1 \n\t" > "pcmpgtw %%mm5, %%mm2 \n\t" > "pcmpgtw %%mm6, %%mm3 \n\t" > "pxor %%mm1, %%mm4 \n\t" > "pxor %%mm2, %%mm5 \n\t" > "pxor %%mm3, %%mm6 \n\t" > "psubw %%mm1, %%mm4 \n\t" > "psubw %%mm2, %%mm5 \n\t" > "psubw %%mm3, %%mm6 \n\t" > "movq %%mm4, (%%edx) \n\t" > "movq %%mm5, 16(%%edx) \n\t" > "movq %%mm6, 32(%%edx) \n\t" > > "movl %%eax, %%ecx \n\t" > "shll $3, %%ecx \n\t" > "subl %%ecx, %%esi \n\t" > "movl %%ebx, %%ecx \n\t" > "shll $3, %%ecx \n\t" > "subl %%ecx, %%edi \n\t" > > // Second loop for the last four columns > "movl $4, %%ecx \n\t" > "pxor %%mm4, %%mm4 \n\t" > "pxor %%mm5, %%mm5 \n\t" > "pxor %%mm6, %%mm6 \n\t" > > ".balign 16 \n\t" > "3: \n\t" > > "movq (%%esi), %%mm0 \n\t" > "movq (%%esi,%%eax), %%mm1 \n\t" > "addl %%eax, %%esi \n\t" > "addl %%eax, %%esi \n\t" > "movq (%%edi), %%mm2 \n\t" > "movq (%%edi,%%ebx), %%mm3 \n\t" > "addl %%ebx, %%edi \n\t" > "addl %%ebx, %%edi \n\t" > "punpckhbw %%mm7, %%mm0 \n\t" > "punpckhbw %%mm7, %%mm1 \n\t" > "punpckhbw %%mm7, %%mm2 \n\t" > "punpckhbw %%mm7, %%mm3 \n\t" > "paddw %%mm1, %%mm4 \n\t" > "paddw %%mm1, %%mm5 \n\t" > "paddw %%mm3, %%mm6 \n\t" > "psubw %%mm0, %%mm4 \n\t" > "psubw %%mm2, %%mm5 \n\t" > "psubw %%mm2, %%mm6 \n\t" > > "decl %%ecx \n\t" > "jnz 3b \n\t" > > "movq %%mm0, %%mm1 \n\t" > "movq %%mm0, %%mm2 \n\t" > "movq %%mm0, %%mm3 \n\t" > "pcmpgtw %%mm4, %%mm1 \n\t" > "pcmpgtw %%mm5, %%mm2 \n\t" > "pcmpgtw %%mm6, %%mm3 \n\t" > "pxor %%mm1, %%mm4 \n\t" > "pxor %%mm2, %%mm5 \n\t" > "pxor %%mm3, %%mm6 \n\t" > "psubw %%mm1, %%mm4 \n\t" > "psubw %%mm2, %%mm5 \n\t" > "psubw %%mm3, %%mm6 \n\t" > "movq %%mm4, 8(%%edx) \n\t" > "movq %%mm5, 24(%%edx) \n\t" > "movq %%mm6, 40(%%edx) \n\t" > > "emms \n\t" > : > : "S" (old), "D" (new), "a" (os), "b" (ns), "d" (out) > : "memory" > ); > m->p = m->t = m->s = 0; > for (i=0; i<8; i++) { > m->p += out[i]; > m->t += out[8+i]; > m->s += out[16+i]; > } > //printf("e=%d o=%d d=%d p=%d t=%d s=%d\n", m->e, m->o, m->d, m->p, m->t, m->s); >} >#endif > >//#define MAG(a) ((a)*(a)) >//#define MAG(a) (abs(a)) >#define MAG(a) (((a)^((a)>>31))-((a)>>31)) > >//#define LOWPASS(s) (((s)[-2] + 4*(s)[-1] + 6*(s)[0] + 4*(s)[1] + (s)[2])>>4) >//#define LOWPASS(s) (((s)[-1] + 2*(s)[0] + (s)[1])>>2) >#define LOWPASS(s) ((s)[0]) > > >static void block_diffs_C(struct metrics *m, unsigned char *old, unsigned char *new, int os, int ns) >{ > int x, y, e=0, o=0, s=0, p=0, t=0; > unsigned char *oldp, *newp; > m->s = m->p = m->t = 0; > for (x = 8; x; x--) { > oldp = old++; > newp = new++; > s = p = t = 0; > for (y = 4; y; y--) { > e += MAG(newp[0]-oldp[0]); > o += MAG(newp[ns]-oldp[os]); > s += newp[ns]-newp[0]; > p += old
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 66949
: 41498