This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: where do I figure out "relocation R_X86_64_PC32" errors


H. J. Lu wrote:
On Sun, Sep 17, 2006 at 10:38:23AM -0400, sean wrote:

I'm trying to build ffmpeg svn.

It dies:

gcc -shared -Wl,-soname,libswscale.so.0 -Wl,--warn-common -pthread -rdynamic -export-dynamic -Wl,--as-needed -Wl,-rpath-link,/usr/src/redhat/BUILD/ffmpeg/libavcodec -Wl,-rpath-link,/usr/src/redhat/BUILD/ffmpeg/libavformat -Wl,-rpath-link,/usr/src/redhat/BUILD/ffmpeg/libavutil -o libswscale.so.0 swscale.o rgb2rgb.o yuv2rgb.o -L../libavutil -lavutil -lm -lz -lgsm -lmp3lame -lvorbis -lvorbisenc -logg -logg -lxvidcore -lx264 -ldc1394_control -lraw1394 -lfaac -lfaad -ldl
ranlib libswscale.a
/usr/bin/ld: yuv2rgb.o: relocation R_X86_64_PC32 against `mmx_00ffw' can not be used when making a shared object; recompile with -fPIC


but yuv2rgb _was_ compiled with -fPIC:

gcc -I.. -I/usr/src/redhat/BUILD/ffmpeg -I/usr/src/redhat/BUILD/ffmpeg/libavutil -fPIC -march=k8 -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Winline -O3 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -DPIC -c -o yuv2rgb.o yuv2rgb.c


mmx_00ffw is just a constant in yuv2rgb.c:


uint64_t attribute_used __attribute__((aligned(8))) mmx_00ffw = 0x00ff00ff00ff00ffULL;

Any suggestions are appreciated on how to fix this.



Can you send me preprocessed yuv2rgb.c?


H.J.



Attached is the result of :


gcc -E -I.. -I/usr/src/redhat/BUILD/ffmpeg -I/usr/src/redhat/BUILD/ffmpeg/libavutil -fPIC -march=k8 -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Winline -O3 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -DPIC -c -o yuv2rgb.pre yuv2rgb.c

Anything else I can provide?

sean
# 1 "yuv2rgb.c"
# 1 "/usr/src/redhat/BUILD/ffmpeg/libswscale//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "yuv2rgb.c"
# 33 "yuv2rgb.c"
# 1 "/usr/include/stdio.h" 1 3 4
# 28 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 329 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 313 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 314 "/usr/include/sys/cdefs.h" 2 3 4
# 330 "/usr/include/features.h" 2 3 4
# 352 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4



# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4




# 1 "/usr/include/gnu/stubs-64.h" 1 3 4
# 10 "/usr/include/gnu/stubs.h" 2 3 4
# 353 "/usr/include/features.h" 2 3 4
# 29 "/usr/include/stdio.h" 2 3 4





# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 214 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 35 "/usr/include/stdio.h" 2 3 4

# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4


# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 32 "/usr/include/bits/types.h" 2 3 4


typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;


typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;







typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
# 134 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 135 "/usr/include/bits/types.h" 2 3 4


typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned long int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;

typedef int __daddr_t;
typedef long int __swblk_t;
typedef int __key_t;


typedef int __clockid_t;


typedef void * __timer_t;


typedef long int __blksize_t;




typedef long int __blkcnt_t;
typedef long int __blkcnt64_t;


typedef unsigned long int __fsblkcnt_t;
typedef unsigned long int __fsblkcnt64_t;


typedef unsigned long int __fsfilcnt_t;
typedef unsigned long int __fsfilcnt64_t;

typedef long int __ssize_t;



typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;


typedef long int __intptr_t;


typedef unsigned int __socklen_t;
# 37 "/usr/include/stdio.h" 2 3 4









typedef struct _IO_FILE FILE;





# 62 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 72 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 14 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 326 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 3 4
typedef int wchar_t;
# 355 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 3 4
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3 4
# 24 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4

# 1 "/usr/include/bits/wchar.h" 1 3 4
# 51 "/usr/include/wchar.h" 2 3 4
# 76 "/usr/include/wchar.h" 3 4
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    char __wchb[4];
  } __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3 4

typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
# 44 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/gconv.h" 1 3 4
# 28 "/usr/include/gconv.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4
# 29 "/usr/include/gconv.h" 2 3 4


# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 32 "/usr/include/gconv.h" 2 3 4





enum
{
  __GCONV_OK = 0,
  __GCONV_NOCONV,
  __GCONV_NODB,
  __GCONV_NOMEM,

  __GCONV_EMPTY_INPUT,
  __GCONV_FULL_OUTPUT,
  __GCONV_ILLEGAL_INPUT,
  __GCONV_INCOMPLETE_INPUT,

  __GCONV_ILLEGAL_DESCRIPTOR,
  __GCONV_INTERNAL_ERROR
};



enum
{
  __GCONV_IS_LAST = 0x0001,
  __GCONV_IGNORE_ERRORS = 0x0002
};



struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;



typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
       __const unsigned char **, __const unsigned char *,
       unsigned char **, size_t *, int, int);


typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);


typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);



typedef int (*__gconv_trans_fct) (struct __gconv_step *,
      struct __gconv_step_data *, void *,
      __const unsigned char *,
      __const unsigned char **,
      __const unsigned char *, unsigned char **,
      size_t *);


typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
       __const unsigned char *,
       unsigned char *, unsigned char *);


typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
     size_t *);


typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);

struct __gconv_trans_data
{

  __gconv_trans_fct __trans_fct;
  __gconv_trans_context_fct __trans_context_fct;
  __gconv_trans_end_fct __trans_end_fct;
  void *__data;
  struct __gconv_trans_data *__next;
};



struct __gconv_step
{
  struct __gconv_loaded_object *__shlib_handle;
  __const char *__modname;

  int __counter;

  char *__from_name;
  char *__to_name;

  __gconv_fct __fct;
  __gconv_btowc_fct __btowc_fct;
  __gconv_init_fct __init_fct;
  __gconv_end_fct __end_fct;



  int __min_needed_from;
  int __max_needed_from;
  int __min_needed_to;
  int __max_needed_to;


  int __stateful;

  void *__data;
};



struct __gconv_step_data
{
  unsigned char *__outbuf;
  unsigned char *__outbufend;



  int __flags;



  int __invocation_counter;



  int __internal_use;

  __mbstate_t *__statep;
  __mbstate_t __state;



  struct __gconv_trans_data *__trans;
};



typedef struct __gconv_info
{
  size_t __nsteps;
  struct __gconv_step *__steps;
  __extension__ struct __gconv_step_data __data [];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3 4
typedef union
{
  struct __gconv_info __cd;
  struct
  {
    struct __gconv_info __cd;
    struct __gconv_step_data __data;
  } __combined;
} _G_iconv_t;

typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stdarg.h" 1 3 4
# 43 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 166 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 176 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 199 "/usr/include/libio.h" 3 4
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 267 "/usr/include/libio.h" 3 4
struct _IO_FILE {
  int _flags;




  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;



  int _flags2;

  __off_t _old_offset;



  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 315 "/usr/include/libio.h" 3 4
  __off64_t _offset;
# 324 "/usr/include/libio.h" 3 4
  void *__pad1;
  void *__pad2;
  void *__pad3;
  void *__pad4;
  size_t __pad5;

  int _mode;

  char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 360 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
     size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);




typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;


typedef struct
{
  __io_read_fn *read;
  __io_write_fn *write;
  __io_seek_fn *seek;
  __io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;

struct _IO_cookie_file;


extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
        void *__cookie, _IO_cookie_io_functions_t __fns);







extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__));
extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__));
# 450 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));

extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__));





extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
# 480 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
   __gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
    __gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__));
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__));

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__));
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__));

extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
# 73 "/usr/include/stdio.h" 2 3 4




typedef __gnuc_va_list va_list;
# 86 "/usr/include/stdio.h" 3 4




typedef _G_fpos64_t fpos_t;



typedef _G_fpos64_t fpos64_t;
# 138 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 139 "/usr/include/stdio.h" 2 3 4



extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;









extern int remove (__const char *__filename) __attribute__ ((__nothrow__));

extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));




extern int renameat (int __oldfd, __const char *__old, int __newfd,
       __const char *__new) __attribute__ ((__nothrow__));



# 174 "/usr/include/stdio.h" 3 4
extern FILE *tmpfile (void) __asm__ ("" "tmpfile64");






extern FILE *tmpfile64 (void);



extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));





extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
# 203 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));








extern int fclose (FILE *__stream);




extern int fflush (FILE *__stream);

# 228 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 238 "/usr/include/stdio.h" 3 4
extern int fcloseall (void);




# 259 "/usr/include/stdio.h" 3 4
extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64");

extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64");









extern FILE *fopen64 (__const char *__restrict __filename,
        __const char *__restrict __modes);
extern FILE *freopen64 (__const char *__restrict __filename,
   __const char *__restrict __modes,
   FILE *__restrict __stream);




extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));





extern FILE *fopencookie (void *__restrict __magic_cookie,
     __const char *__restrict __modes,
     _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__));


extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) __attribute__ ((__nothrow__));




extern FILE *open_memstream (char **__restrict __bufloc,
        size_t *__restrict __sizeloc) __attribute__ ((__nothrow__));



extern FILE *open_wmemstream (wchar_t **__restrict __bufloc,
         size_t *__restrict __sizeloc) __attribute__ ((__nothrow__));






extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
      int __modes, size_t __n) __attribute__ ((__nothrow__));





extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
         size_t __size) __attribute__ ((__nothrow__));


extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));








extern int fprintf (FILE *__restrict __stream,
      __const char *__restrict __format, ...);




extern int printf (__const char *__restrict __format, ...);

extern int sprintf (char *__restrict __s,
      __const char *__restrict __format, ...) __attribute__ ((__nothrow__));





extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg);




extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg) __attribute__ ((__nothrow__));





extern int snprintf (char *__restrict __s, size_t __maxlen,
       __const char *__restrict __format, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
        __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));






extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
        __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
extern int __asprintf (char **__restrict __ptr,
         __const char *__restrict __fmt, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
extern int asprintf (char **__restrict __ptr,
       __const char *__restrict __fmt, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));







extern int vdprintf (int __fd, __const char *__restrict __fmt,
       __gnuc_va_list __arg)
     __attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
     __attribute__ ((__format__ (__printf__, 2, 3)));








extern int fscanf (FILE *__restrict __stream,
     __const char *__restrict __format, ...) ;




extern int scanf (__const char *__restrict __format, ...) ;

extern int sscanf (__const char *__restrict __s,
     __const char *__restrict __format, ...) __attribute__ ((__nothrow__));








extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
      __gnuc_va_list __arg)
     __attribute__ ((__format__ (__scanf__, 2, 0))) ;





extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__format__ (__scanf__, 1, 0))) ;


extern int vsscanf (__const char *__restrict __s,
      __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));









extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);





extern int getchar (void);

# 466 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 477 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);











extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);





extern int putchar (int __c);

# 510 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);







extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);






extern int getw (FILE *__stream);


extern int putw (int __w, FILE *__stream);








extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
     ;






extern char *gets (char *__s) ;

# 556 "/usr/include/stdio.h" 3 4
extern char *fgets_unlocked (char *__restrict __s, int __n,
        FILE *__restrict __stream) ;
# 572 "/usr/include/stdio.h" 3 4
extern __ssize_t __getdelim (char **__restrict __lineptr,
          size_t *__restrict __n, int __delimiter,
          FILE *__restrict __stream) ;
extern __ssize_t getdelim (char **__restrict __lineptr,
        size_t *__restrict __n, int __delimiter,
        FILE *__restrict __stream) ;







extern __ssize_t getline (char **__restrict __lineptr,
       size_t *__restrict __n,
       FILE *__restrict __stream) ;








extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);





extern int puts (__const char *__s);






extern int ungetc (int __c, FILE *__stream);






extern size_t fread (void *__restrict __ptr, size_t __size,
       size_t __n, FILE *__restrict __stream) ;




extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
        size_t __n, FILE *__restrict __s) ;

# 633 "/usr/include/stdio.h" 3 4
extern int fputs_unlocked (__const char *__restrict __s,
      FILE *__restrict __stream);
# 644 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
         size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
          size_t __n, FILE *__restrict __stream) ;








extern int fseek (FILE *__stream, long int __off, int __whence);




extern long int ftell (FILE *__stream) ;




extern void rewind (FILE *__stream);

# 688 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64");


extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64");








# 713 "/usr/include/stdio.h" 3 4
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64");

extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64");









extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
extern __off64_t ftello64 (FILE *__stream) ;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);




extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));

extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;

extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;








extern void perror (__const char *__s);






# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];


extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
# 761 "/usr/include/stdio.h" 2 3 4




extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
# 780 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;





extern int pclose (FILE *__stream);





extern char *ctermid (char *__s) __attribute__ ((__nothrow__));





extern char *cuserid (char *__s);




struct obstack;


extern int obstack_printf (struct obstack *__restrict __obstack,
      __const char *__restrict __format, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
       __const char *__restrict __format,
       __gnuc_va_list __args)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));







extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));



extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;


extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
# 841 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio.h" 1 3 4
# 33 "/usr/include/bits/stdio.h" 3 4
extern __inline int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
{
  return vfprintf (stdout, __fmt, __arg);
}


extern __inline int
getchar (void)
{
  return _IO_getc (stdin);
}




extern __inline int
getc_unlocked (FILE *__fp)
{
  return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}


extern __inline int
getchar_unlocked (void)
{
  return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
}




extern __inline int
putchar (int __c)
{
  return _IO_putc (__c, stdout);
}




extern __inline int
fputc_unlocked (int __c, FILE *__stream)
{
  return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}





extern __inline int
putc_unlocked (int __c, FILE *__stream)
{
  return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}


extern __inline int
putchar_unlocked (int __c)
{
  return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
}





extern __inline __ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
{
  return __getdelim (__lineptr, __n, '\n', __stream);
}





extern __inline int
__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream)
{
  return (((__stream)->_flags & 0x10) != 0);
}


extern __inline int
__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream)
{
  return (((__stream)->_flags & 0x20) != 0);
}
# 842 "/usr/include/stdio.h" 2 3 4
# 850 "/usr/include/stdio.h" 3 4

# 34 "yuv2rgb.c" 2
# 1 "/usr/include/stdlib.h" 1 3 4
# 33 "/usr/include/stdlib.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 34 "/usr/include/stdlib.h" 2 3 4








# 1 "/usr/include/bits/waitflags.h" 1 3 4
# 43 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/bits/waitstatus.h" 1 3 4
# 65 "/usr/include/bits/waitstatus.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/endian.h" 1 3 4
# 38 "/usr/include/endian.h" 2 3 4
# 66 "/usr/include/bits/waitstatus.h" 2 3 4

union wait
  {
    int w_status;
    struct
      {

 unsigned int __w_termsig:7;
 unsigned int __w_coredump:1;
 unsigned int __w_retcode:8;
 unsigned int:16;







      } __wait_terminated;
    struct
      {

 unsigned int __w_stopval:8;
 unsigned int __w_stopsig:8;
 unsigned int:16;






      } __wait_stopped;
  };
# 44 "/usr/include/stdlib.h" 2 3 4
# 68 "/usr/include/stdlib.h" 3 4
typedef union
  {
    union wait *__uptr;
    int *__iptr;
  } __WAIT_STATUS __attribute__ ((__transparent_union__));
# 96 "/usr/include/stdlib.h" 3 4


typedef struct
  {
    int quot;
    int rem;
  } div_t;



typedef struct
  {
    long int quot;
    long int rem;
  } ldiv_t;







__extension__ typedef struct
  {
    long long int quot;
    long long int rem;
  } lldiv_t;


# 140 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ;




extern double atof (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern int atoi (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern long int atol (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





__extension__ extern long long int atoll (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





extern double strtod (__const char *__restrict __nptr,
        char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern float strtof (__const char *__restrict __nptr,
       char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern long double strtold (__const char *__restrict __nptr,
       char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern long int strtol (__const char *__restrict __nptr,
   char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern unsigned long int strtoul (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int strtoq (__const char *__restrict __nptr,
        char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
           char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





__extension__
extern long long int strtoll (__const char *__restrict __nptr,
         char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

# 236 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/xlocale.h" 1 3 4
# 28 "/usr/include/xlocale.h" 3 4
typedef struct __locale_struct
{

  struct locale_data *__locales[13];


  const unsigned short int *__ctype_b;
  const int *__ctype_tolower;
  const int *__ctype_toupper;


  const char *__names[13];
} *__locale_t;
# 237 "/usr/include/stdlib.h" 2 3 4



extern long int strtol_l (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base,
     __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

extern unsigned long int strtoul_l (__const char *__restrict __nptr,
        char **__restrict __endptr,
        int __base, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

__extension__
extern long long int strtoll_l (__const char *__restrict __nptr,
    char **__restrict __endptr, int __base,
    __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

__extension__
extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
       char **__restrict __endptr,
       int __base, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

extern double strtod_l (__const char *__restrict __nptr,
   char **__restrict __endptr, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;

extern float strtof_l (__const char *__restrict __nptr,
         char **__restrict __endptr, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;

extern long double strtold_l (__const char *__restrict __nptr,
         char **__restrict __endptr,
         __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;






extern double __strtod_internal (__const char *__restrict __nptr,
     char **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern float __strtof_internal (__const char *__restrict __nptr,
    char **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern long double __strtold_internal (__const char *__restrict __nptr,
           char **__restrict __endptr,
           int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern long int __strtol_internal (__const char *__restrict __nptr,
       char **__restrict __endptr,
       int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
          char **__restrict __endptr,
          int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr,
      char **__restrict __endptr,
      int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



__extension__
extern unsigned long long int __strtoull_internal (__const char *
         __restrict __nptr,
         char **__restrict __endptr,
         int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;








extern __inline double
__attribute__ ((__nothrow__)) strtod (__const char *__restrict __nptr, char **__restrict __endptr)
{
  return __strtod_internal (__nptr, __endptr, 0);
}
extern __inline long int
__attribute__ ((__nothrow__)) strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base)

{
  return __strtol_internal (__nptr, __endptr, __base, 0);
}
extern __inline unsigned long int
__attribute__ ((__nothrow__)) strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base)

{
  return __strtoul_internal (__nptr, __endptr, __base, 0);
}




extern __inline float
__attribute__ ((__nothrow__)) strtof (__const char *__restrict __nptr, char **__restrict __endptr)
{
  return __strtof_internal (__nptr, __endptr, 0);
}

extern __inline long double
__attribute__ ((__nothrow__)) strtold (__const char *__restrict __nptr, char **__restrict __endptr)
{
  return __strtold_internal (__nptr, __endptr, 0);
}





__extension__ extern __inline long long int
__attribute__ ((__nothrow__)) strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base)

{
  return __strtoll_internal (__nptr, __endptr, __base, 0);
}
__extension__ extern __inline unsigned long long int
__attribute__ ((__nothrow__)) strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base)

{
  return __strtoull_internal (__nptr, __endptr, __base, 0);
}




__extension__ extern __inline long long int
__attribute__ ((__nothrow__)) strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base)

{
  return __strtoll_internal (__nptr, __endptr, __base, 0);
}
__extension__ extern __inline unsigned long long int
__attribute__ ((__nothrow__)) strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base)

{
  return __strtoull_internal (__nptr, __endptr, __base, 0);
}




extern __inline double
__attribute__ ((__nothrow__)) atof (__const char *__nptr)
{
  return strtod (__nptr, (char **) ((void *)0));
}
extern __inline int
__attribute__ ((__nothrow__)) atoi (__const char *__nptr)
{
  return (int) strtol (__nptr, (char **) ((void *)0), 10);
}
extern __inline long int
__attribute__ ((__nothrow__)) atol (__const char *__nptr)
{
  return strtol (__nptr, (char **) ((void *)0), 10);
}




__extension__ extern __inline long long int
__attribute__ ((__nothrow__)) atoll (__const char *__nptr)
{
  return strtoll (__nptr, (char **) ((void *)0), 10);
}

# 429 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;


extern long int a64l (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;




# 1 "/usr/include/sys/types.h" 1 3 4
# 29 "/usr/include/sys/types.h" 3 4






typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;




typedef __loff_t loff_t;





typedef __ino64_t ino_t;




typedef __ino64_t ino64_t;




typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;







typedef __off64_t off_t;




typedef __off64_t off64_t;




typedef __pid_t pid_t;




typedef __id_t id_t;




typedef __ssize_t ssize_t;





typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;





typedef __key_t key_t;
# 133 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 59 "/usr/include/time.h" 3 4


typedef __clock_t clock_t;



# 75 "/usr/include/time.h" 3 4


typedef __time_t time_t;



# 93 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 105 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 134 "/usr/include/sys/types.h" 2 3 4



typedef __useconds_t useconds_t;



typedef __suseconds_t suseconds_t;





# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 148 "/usr/include/sys/types.h" 2 3 4



typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 195 "/usr/include/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));
# 220 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/sys/select.h" 1 3 4
# 31 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/bits/select.h" 1 3 4
# 32 "/usr/include/sys/select.h" 2 3 4


# 1 "/usr/include/bits/sigset.h" 1 3 4
# 23 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;




typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4



typedef __sigset_t sigset_t;





# 1 "/usr/include/time.h" 1 3 4
# 121 "/usr/include/time.h" 3 4
struct timespec
  {
    __time_t tv_sec;
    long int tv_nsec;
  };
# 45 "/usr/include/sys/select.h" 2 3 4

# 1 "/usr/include/bits/time.h" 1 3 4
# 69 "/usr/include/bits/time.h" 3 4
struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
# 47 "/usr/include/sys/select.h" 2 3 4
# 55 "/usr/include/sys/select.h" 3 4
typedef long int __fd_mask;
# 67 "/usr/include/sys/select.h" 3 4
typedef struct
  {



    __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];





  } fd_set;






typedef __fd_mask fd_mask;
# 99 "/usr/include/sys/select.h" 3 4

# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
     fd_set *__restrict __writefds,
     fd_set *__restrict __exceptfds,
     struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
      fd_set *__restrict __writefds,
      fd_set *__restrict __exceptfds,
      const struct timespec *__restrict __timeout,
      const __sigset_t *__restrict __sigmask);



# 221 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 29 "/usr/include/sys/sysmacros.h" 3 4
__extension__
extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
       unsigned int __minor)
     __attribute__ ((__nothrow__));


__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
{
  return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
{
  return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}

__extension__ extern __inline unsigned long long int
__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
{
  return ((__minor & 0xff) | ((__major & 0xfff) << 8)
   | (((unsigned long long int) (__minor & ~0xff)) << 12)
   | (((unsigned long long int) (__major & ~0xfff)) << 32));
}
# 224 "/usr/include/sys/types.h" 2 3 4




typedef __blksize_t blksize_t;
# 248 "/usr/include/sys/types.h" 3 4
typedef __blkcnt64_t blkcnt_t;



typedef __fsblkcnt64_t fsblkcnt_t;



typedef __fsfilcnt64_t fsfilcnt_t;





typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;





# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 23 "/usr/include/bits/pthreadtypes.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4
# 50 "/usr/include/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;


typedef union
{
  char __size[56];
  long int __align;
} pthread_attr_t;



typedef struct __pthread_internal_list
{
  struct __pthread_internal_list *__prev;
  struct __pthread_internal_list *__next;
} __pthread_list_t;
# 76 "/usr/include/bits/pthreadtypes.h" 3 4
typedef union
{
  struct __pthread_mutex_s
  {
    int __lock;
    unsigned int __count;
    int __owner;

    unsigned int __nusers;



    int __kind;

    int __spins;
    __pthread_list_t __list;
# 101 "/usr/include/bits/pthreadtypes.h" 3 4
  } __data;
  char __size[40];
  long int __align;
} pthread_mutex_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_mutexattr_t;




typedef union
{
  struct
  {
    int __lock;
    unsigned int __futex;
    __extension__ unsigned long long int __total_seq;
    __extension__ unsigned long long int __wakeup_seq;
    __extension__ unsigned long long int __woken_seq;
    void *__mutex;
    unsigned int __nwaiters;
    unsigned int __broadcast_seq;
  } __data;
  char __size[48];
  __extension__ long long int __align;
} pthread_cond_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_condattr_t;



typedef unsigned int pthread_key_t;



typedef int pthread_once_t;





typedef union
{

  struct
  {
    int __lock;
    unsigned int __nr_readers;
    unsigned int __readers_wakeup;
    unsigned int __writer_wakeup;
    unsigned int __nr_readers_queued;
    unsigned int __nr_writers_queued;
    int __writer;
    int __pad1;
    unsigned long int __pad2;
    unsigned long int __pad3;


    unsigned int __flags;
  } __data;
# 184 "/usr/include/bits/pthreadtypes.h" 3 4
  char __size[56];
  long int __align;
} pthread_rwlock_t;

typedef union
{
  char __size[8];
  long int __align;
} pthread_rwlockattr_t;





typedef volatile int pthread_spinlock_t;




typedef union
{
  char __size[32];
  long int __align;
} pthread_barrier_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_barrierattr_t;
# 271 "/usr/include/sys/types.h" 2 3 4



# 439 "/usr/include/stdlib.h" 2 3 4






extern long int random (void) __attribute__ ((__nothrow__));


extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));





extern char *initstate (unsigned int __seed, char *__statebuf,
   size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));



extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







struct random_data
  {
    int32_t *fptr;
    int32_t *rptr;
    int32_t *state;
    int rand_type;
    int rand_deg;
    int rand_sep;
    int32_t *end_ptr;
  };

extern int random_r (struct random_data *__restrict __buf,
       int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int srandom_r (unsigned int __seed, struct random_data *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
   size_t __statelen,
   struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));

extern int setstate_r (char *__restrict __statebuf,
         struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern int rand (void) __attribute__ ((__nothrow__));

extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));




extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));







extern double drand48 (void) __attribute__ ((__nothrow__));
extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int lrand48 (void) __attribute__ ((__nothrow__));
extern long int nrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int mrand48 (void) __attribute__ ((__nothrow__));
extern long int jrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





struct drand48_data
  {
    unsigned short int __x[3];
    unsigned short int __old_x[3];
    unsigned short int __c;
    unsigned short int __init;
    unsigned long long int __a;
  };


extern int drand48_r (struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int lrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int mrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int seed48_r (unsigned short int __seed16v[3],
       struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int lcong48_r (unsigned short int __param[7],
        struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));









extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;

extern void *calloc (size_t __nmemb, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;







extern void *realloc (void *__ptr, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));

extern void free (void *__ptr) __attribute__ ((__nothrow__));




extern void cfree (void *__ptr) __attribute__ ((__nothrow__));



# 1 "/usr/include/alloca.h" 1 3 4
# 25 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 26 "/usr/include/alloca.h" 2 3 4







extern void *alloca (size_t __size) __attribute__ ((__nothrow__));






# 613 "/usr/include/stdlib.h" 2 3 4




extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;




extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));



extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));






extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));






extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern char *__secure_getenv (__const char *__name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int setenv (__const char *__name, __const char *__value, int __replace)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));


extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));






extern int clearenv (void) __attribute__ ((__nothrow__));
# 698 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 712 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __asm__ ("" "mkstemp64")
     __attribute__ ((__nonnull__ (1))) ;





extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 729 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;








extern int system (__const char *__command) ;







extern char *canonicalize_file_name (__const char *__name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 757 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
         char *__restrict __resolved) __attribute__ ((__nothrow__)) ;






typedef int (*__compar_fn_t) (__const void *, __const void *);


typedef __compar_fn_t comparison_fn_t;






extern void *bsearch (__const void *__key, __const void *__base,
        size_t __nmemb, size_t __size, __compar_fn_t __compar)
     __attribute__ ((__nonnull__ (1, 2, 5))) ;



extern void qsort (void *__base, size_t __nmemb, size_t __size,
     __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));



extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;



__extension__ extern long long int llabs (long long int __x)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;







extern div_t div (int __numer, int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;




__extension__ extern lldiv_t lldiv (long long int __numer,
        long long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;

# 822 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *gcvt (double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern char *qecvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));

extern int qecvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));







extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int mbtowc (wchar_t *__restrict __pwc,
     __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;



extern size_t mbstowcs (wchar_t *__restrict __pwcs,
   __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));

extern size_t wcstombs (char *__restrict __s,
   __const wchar_t *__restrict __pwcs, size_t __n)
     __attribute__ ((__nothrow__));








extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 910 "/usr/include/stdlib.h" 3 4
extern int getsubopt (char **__restrict __optionp,
        char *__const *__restrict __tokens,
        char **__restrict __valuep)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;





extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







extern int posix_openpt (int __oflag) ;







extern int grantpt (int __fd) __attribute__ ((__nothrow__));



extern int unlockpt (int __fd) __attribute__ ((__nothrow__));




extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) ;






extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));


extern int getpt (void);






extern int getloadavg (double __loadavg[], int __nelem)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 978 "/usr/include/stdlib.h" 3 4

# 35 "yuv2rgb.c" 2
# 1 "/usr/include/inttypes.h" 1 3 4
# 28 "/usr/include/inttypes.h" 3 4
# 1 "/usr/include/stdint.h" 1 3 4
# 28 "/usr/include/stdint.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/stdint.h" 2 3 4
# 49 "/usr/include/stdint.h" 3 4
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;

typedef unsigned int uint32_t;



typedef unsigned long int uint64_t;
# 66 "/usr/include/stdint.h" 3 4
typedef signed char int_least8_t;
typedef short int int_least16_t;
typedef int int_least32_t;

typedef long int int_least64_t;






typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;

typedef unsigned long int uint_least64_t;
# 91 "/usr/include/stdint.h" 3 4
typedef signed char int_fast8_t;

typedef long int int_fast16_t;
typedef long int int_fast32_t;
typedef long int int_fast64_t;
# 104 "/usr/include/stdint.h" 3 4
typedef unsigned char uint_fast8_t;

typedef unsigned long int uint_fast16_t;
typedef unsigned long int uint_fast32_t;
typedef unsigned long int uint_fast64_t;
# 120 "/usr/include/stdint.h" 3 4
typedef long int intptr_t;


typedef unsigned long int uintptr_t;
# 135 "/usr/include/stdint.h" 3 4
typedef long int intmax_t;
typedef unsigned long int uintmax_t;
# 29 "/usr/include/inttypes.h" 2 3 4






typedef int __gwchar_t;
# 274 "/usr/include/inttypes.h" 3 4





typedef struct
  {
    long int quot;
    long int rem;
  } imaxdiv_t;
# 298 "/usr/include/inttypes.h" 3 4
extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
      __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern intmax_t strtoimax (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base) __attribute__ ((__nothrow__));


extern uintmax_t strtoumax (__const char *__restrict __nptr,
       char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__));


extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr,
      __gwchar_t **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__));


extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
       __gwchar_t ** __restrict __endptr, int __base)
     __attribute__ ((__nothrow__));
# 333 "/usr/include/inttypes.h" 3 4
extern __inline intmax_t
__attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base)

{
  return __strtol_internal (nptr, endptr, base, 0);
}
# 348 "/usr/include/inttypes.h" 3 4
extern __inline uintmax_t
__attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base)

{
  return __strtoul_internal (nptr, endptr, base, 0);
}



extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr,
       __gwchar_t **__restrict __endptr,
       int __base, int __group) __attribute__ ((__nothrow__));


extern __inline intmax_t
__attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)

{
  return __wcstol_internal (nptr, endptr, base, 0);
}




extern unsigned long int __wcstoul_internal (__const __gwchar_t *
          __restrict __nptr,
          __gwchar_t **
          __restrict __endptr,
          int __base, int __group) __attribute__ ((__nothrow__));


extern __inline uintmax_t
__attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)

{
  return __wcstoul_internal (nptr, endptr, base, 0);
}
# 459 "/usr/include/inttypes.h" 3 4

# 36 "yuv2rgb.c" 2
# 1 "/usr/include/assert.h" 1 3 4
# 65 "/usr/include/assert.h" 3 4



extern void __assert_fail (__const char *__assertion, __const char *__file,
      unsigned int __line, __const char *__function)
     __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));


extern void __assert_perror_fail (int __errnum, __const char *__file,
      unsigned int __line,
      __const char *__function)
     __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));




extern void __assert (const char *__assertion, const char *__file, int __line)
     __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));



# 37 "yuv2rgb.c" 2

# 1 "../config.h" 1
# 39 "yuv2rgb.c" 2
# 1 "rgb2rgb.h" 1
# 31 "rgb2rgb.h"
extern void (*rgb24to32)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb24to16)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb24to15)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb32to24)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb32to16)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb32to15)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb15to16)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb15to24)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb15to32)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb16to15)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb16to24)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb16to32)(const uint8_t *src,uint8_t *dst,long src_size);
extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long src_size);
extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long src_size);

extern void rgb24tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr24(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr16(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr24(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr16(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size);
extern void rgb8tobgr8(const uint8_t *src, uint8_t *dst, long src_size);


extern void palette8torgb32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
# 85 "rgb2rgb.h"
extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 long width, long height,
 long lumStride, long chromStride, long dstStride);





extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 long width, long height,
 long lumStride, long chromStride, long dstStride);






extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 long width, long height,
 long lumStride, long chromStride, long srcStride);






extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 long width, long height,
 long lumStride, long chromStride, long dstStride);







extern void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 long width, long height,
 long lumStride, long chromStride, long srcStride);
extern void (*planar2x)(const uint8_t *src, uint8_t *dst, long width, long height,
 long srcStride, long dstStride);

extern void (*interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dst,
       long width, long height, long src1Stride,
       long src2Stride, long dstStride);

extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
   uint8_t *dst1, uint8_t *dst2,
   long width, long height,
   long srcStride1, long srcStride2,
   long dstStride1, long dstStride2);

extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
   uint8_t *dst,
   long width, long height,
   long srcStride1, long srcStride2,
   long srcStride3, long dstStride);

void sws_rgb2rgb_init(int flags);
# 40 "yuv2rgb.c" 2
# 1 "swscale.h" 1
# 91 "swscale.h"
typedef struct {
 double *coeff;
 int length;
} SwsVector;


typedef struct {
 SwsVector *lumH;
 SwsVector *lumV;
 SwsVector *chrH;
 SwsVector *chrV;
} SwsFilter;

struct SwsContext;

void sws_freeContext(struct SwsContext *swsContext);

struct SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags,
    SwsFilter *srcFilter, SwsFilter *dstFilter, double *param);
int sws_scale(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,
                           int srcSliceH, uint8_t* dst[], int dstStride[]);
int sws_scale_ordered(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,
                           int srcSliceH, uint8_t* dst[], int dstStride[]);


int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation);
int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation);
SwsVector *sws_getGaussianVec(double variance, double quality);
SwsVector *sws_getConstVec(double c, int length);
SwsVector *sws_getIdentityVec(void);
void sws_scaleVec(SwsVector *a, double scalar);
void sws_normalizeVec(SwsVector *a, double height);
void sws_convVec(SwsVector *a, SwsVector *b);
void sws_addVec(SwsVector *a, SwsVector *b);
void sws_subVec(SwsVector *a, SwsVector *b);
void sws_shiftVec(SwsVector *a, int shift);
SwsVector *sws_cloneVec(SwsVector *a);

void sws_printVec(SwsVector *a);
void sws_freeVec(SwsVector *a);

SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
    float lumaSarpen, float chromaSharpen,
    float chromaHShift, float chromaVShift,
    int verbose);
void sws_freeFilter(SwsFilter *filter);

struct SwsContext *sws_getCachedContext(struct SwsContext *context,
                int srcW, int srcH, int srcFormat,
                int dstW, int dstH, int dstFormat, int flags,
                SwsFilter *srcFilter, SwsFilter *dstFilter, double *param);
# 41 "yuv2rgb.c" 2
# 1 "swscale_internal.h" 1
# 29 "swscale_internal.h"
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h" 1
# 42 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h"
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 1
# 33 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h"
# 1 "../config.h" 1
# 34 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 2



# 1 "/usr/include/string.h" 1 3 4
# 28 "/usr/include/string.h" 3 4





# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 34 "/usr/include/string.h" 2 3 4




extern void *memcpy (void *__restrict __dest,
       __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
        int __c, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern void *rawmemchr (__const void *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


extern void *memrchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
        size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcoll (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern size_t strxfrm (char *__restrict __dest,
         __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

# 121 "/usr/include/string.h" 3 4
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));

extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
    __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));




extern char *strdup (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));






extern char *strndup (__const char *__string, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 165 "/usr/include/string.h" 3 4


extern char *strchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

extern char *strrchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern char *strchrnul (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern size_t strcspn (__const char *__s, __const char *__reject)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern size_t strspn (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strpbrk (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strstr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));



extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));




extern char *__strtok_r (char *__restrict __s,
    __const char *__restrict __delim,
    char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
         char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));




extern char *strcasestr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));






extern void *memmem (__const void *__haystack, size_t __haystacklen,
       __const void *__needle, size_t __needlelen)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));



extern void *__mempcpy (void *__restrict __dest,
   __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern void *mempcpy (void *__restrict __dest,
        __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern size_t strlen (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern size_t strnlen (__const char *__string, size_t __maxlen)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern char *strerror (int __errnum) __attribute__ ((__nothrow__));

# 281 "/usr/include/string.h" 3 4
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));





extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern void bcopy (__const void *__src, void *__dest, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *index (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


extern char *rindex (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));



extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

__extension__ extern int ffsll (long long int __ll)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern int strcasecmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));





extern int strcasecmp_l (__const char *__s1, __const char *__s2,
    __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));

extern int strncasecmp_l (__const char *__s1, __const char *__s2,
     size_t __n, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));





extern char *strsep (char **__restrict __stringp,
       __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));




extern int strverscmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strsignal (int __sig) __attribute__ ((__nothrow__));


extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));



extern char *__stpncpy (char *__restrict __dest,
   __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 414 "/usr/include/string.h" 3 4
# 1 "/usr/include/bits/string.h" 1 3 4
# 415 "/usr/include/string.h" 2 3 4


# 1 "/usr/include/bits/string2.h" 1 3 4
# 394 "/usr/include/bits/string2.h" 3 4
extern void *__rawmemchr (const void *__s, int __c);
# 969 "/usr/include/bits/string2.h" 3 4
extern __inline size_t __strcspn_c1 (__const char *__s, int __reject);
extern __inline size_t
__strcspn_c1 (__const char *__s, int __reject)
{
  register size_t __result = 0;
  while (__s[__result] != '\0' && __s[__result] != __reject)
    ++__result;
  return __result;
}

extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1,
         int __reject2);
extern __inline size_t
__strcspn_c2 (__const char *__s, int __reject1, int __reject2)
{
  register size_t __result = 0;
  while (__s[__result] != '\0' && __s[__result] != __reject1
  && __s[__result] != __reject2)
    ++__result;
  return __result;
}

extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1,
         int __reject2, int __reject3);
extern __inline size_t
__strcspn_c3 (__const char *__s, int __reject1, int __reject2,
       int __reject3)
{
  register size_t __result = 0;
  while (__s[__result] != '\0' && __s[__result] != __reject1
  && __s[__result] != __reject2 && __s[__result] != __reject3)
    ++__result;
  return __result;
}
# 1045 "/usr/include/bits/string2.h" 3 4
extern __inline size_t __strspn_c1 (__const char *__s, int __accept);
extern __inline size_t
__strspn_c1 (__const char *__s, int __accept)
{
  register size_t __result = 0;

  while (__s[__result] == __accept)
    ++__result;
  return __result;
}

extern __inline size_t __strspn_c2 (__const char *__s, int __accept1,
        int __accept2);
extern __inline size_t
__strspn_c2 (__const char *__s, int __accept1, int __accept2)
{
  register size_t __result = 0;

  while (__s[__result] == __accept1 || __s[__result] == __accept2)
    ++__result;
  return __result;
}

extern __inline size_t __strspn_c3 (__const char *__s, int __accept1,
        int __accept2, int __accept3);
extern __inline size_t
__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
{
  register size_t __result = 0;

  while (__s[__result] == __accept1 || __s[__result] == __accept2
  || __s[__result] == __accept3)
    ++__result;
  return __result;
}
# 1121 "/usr/include/bits/string2.h" 3 4
extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1,
         int __accept2);
extern __inline char *
__strpbrk_c2 (__const char *__s, int __accept1, int __accept2)
{

  while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
    ++__s;
  return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
}

extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1,
         int __accept2, int __accept3);
extern __inline char *
__strpbrk_c3 (__const char *__s, int __accept1, int __accept2,
       int __accept3)
{

  while (*__s != '\0' && *__s != __accept1 && *__s != __accept2
  && *__s != __accept3)
    ++__s;
  return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
}
# 1173 "/usr/include/bits/string2.h" 3 4
extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
extern __inline char *
__strtok_r_1c (char *__s, char __sep, char **__nextp)
{
  char *__result;
  if (__s == ((void *)0))
    __s = *__nextp;
  while (*__s == __sep)
    ++__s;
  __result = ((void *)0);
  if (*__s != '\0')
    {
      __result = __s++;
      while (*__s != '\0')
 if (*__s++ == __sep)
   {
     __s[-1] = '\0';
     break;
   }
      *__nextp = __s;
    }
  return __result;
}
# 1205 "/usr/include/bits/string2.h" 3 4
extern char *__strsep_g (char **__stringp, __const char *__delim);
# 1223 "/usr/include/bits/string2.h" 3 4
extern __inline char *__strsep_1c (char **__s, char __reject);
extern __inline char *
__strsep_1c (char **__s, char __reject)
{
  register char *__retval = *__s;
  if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0))
    *(*__s)++ = '\0';
  return __retval;
}

extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2);
extern __inline char *
__strsep_2c (char **__s, char __reject1, char __reject2)
{
  register char *__retval = *__s;
  if (__retval != ((void *)0))
    {
      register char *__cp = __retval;
      while (1)
 {
   if (*__cp == '\0')
     {
       __cp = ((void *)0);
   break;
     }
   if (*__cp == __reject1 || *__cp == __reject2)
     {
       *__cp++ = '\0';
       break;
     }
   ++__cp;
 }
      *__s = __cp;
    }
  return __retval;
}

extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2,
       char __reject3);
extern __inline char *
__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
{
  register char *__retval = *__s;
  if (__retval != ((void *)0))
    {
      register char *__cp = __retval;
      while (1)
 {
   if (*__cp == '\0')
     {
       __cp = ((void *)0);
   break;
     }
   if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3)
     {
       *__cp++ = '\0';
       break;
     }
   ++__cp;
 }
      *__s = __cp;
    }
  return __retval;
}
# 1304 "/usr/include/bits/string2.h" 3 4
extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
# 1323 "/usr/include/bits/string2.h" 3 4
extern char *__strndup (__const char *__string, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
# 418 "/usr/include/string.h" 2 3 4
# 426 "/usr/include/string.h" 3 4

# 38 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 2
# 1 "/usr/include/ctype.h" 1 3 4
# 30 "/usr/include/ctype.h" 3 4

# 48 "/usr/include/ctype.h" 3 4
enum
{
  _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
  _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
  _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
  _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
  _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
  _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
  _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
  _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
  _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
  _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
  _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
  _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
};
# 81 "/usr/include/ctype.h" 3 4
extern __const unsigned short int **__ctype_b_loc (void)
     __attribute__ ((__const));
extern __const __int32_t **__ctype_tolower_loc (void)
     __attribute__ ((__const));
extern __const __int32_t **__ctype_toupper_loc (void)
     __attribute__ ((__const));
# 96 "/usr/include/ctype.h" 3 4






extern int isalnum (int) __attribute__ ((__nothrow__));
extern int isalpha (int) __attribute__ ((__nothrow__));
extern int iscntrl (int) __attribute__ ((__nothrow__));
extern int isdigit (int) __attribute__ ((__nothrow__));
extern int islower (int) __attribute__ ((__nothrow__));
extern int isgraph (int) __attribute__ ((__nothrow__));
extern int isprint (int) __attribute__ ((__nothrow__));
extern int ispunct (int) __attribute__ ((__nothrow__));
extern int isspace (int) __attribute__ ((__nothrow__));
extern int isupper (int) __attribute__ ((__nothrow__));
extern int isxdigit (int) __attribute__ ((__nothrow__));



extern int tolower (int __c) __attribute__ ((__nothrow__));


extern int toupper (int __c) __attribute__ ((__nothrow__));








extern int isblank (int) __attribute__ ((__nothrow__));






extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__));






extern int isascii (int __c) __attribute__ ((__nothrow__));



extern int toascii (int __c) __attribute__ ((__nothrow__));



extern int _toupper (int) __attribute__ ((__nothrow__));
extern int _tolower (int) __attribute__ ((__nothrow__));
# 190 "/usr/include/ctype.h" 3 4
extern __inline int
__attribute__ ((__nothrow__)) tolower (int __c)
{
  return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
}

extern __inline int
__attribute__ ((__nothrow__)) toupper (int __c)
{
  return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
}
# 247 "/usr/include/ctype.h" 3 4
extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__));

extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__));



extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));


extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
# 323 "/usr/include/ctype.h" 3 4

# 39 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/limits.h" 1 3 4
# 11 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/limits.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/syslimits.h" 1 3 4






# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/limits.h" 1 3 4
# 122 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/limits.h" 3 4
# 1 "/usr/include/limits.h" 1 3 4
# 145 "/usr/include/limits.h" 3 4
# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
# 153 "/usr/include/bits/posix1_lim.h" 3 4
# 1 "/usr/include/bits/local_lim.h" 1 3 4
# 36 "/usr/include/bits/local_lim.h" 3 4
# 1 "/usr/include/linux/limits.h" 1 3 4
# 37 "/usr/include/bits/local_lim.h" 2 3 4
# 154 "/usr/include/bits/posix1_lim.h" 2 3 4
# 146 "/usr/include/limits.h" 2 3 4



# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
# 150 "/usr/include/limits.h" 2 3 4



# 1 "/usr/include/bits/xopen_lim.h" 1 3 4
# 34 "/usr/include/bits/xopen_lim.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 35 "/usr/include/bits/xopen_lim.h" 2 3 4
# 154 "/usr/include/limits.h" 2 3 4
# 123 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/limits.h" 2 3 4
# 8 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/syslimits.h" 2 3 4
# 12 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/limits.h" 2 3 4
# 40 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 2

# 1 "/usr/include/errno.h" 1 3 4
# 32 "/usr/include/errno.h" 3 4




# 1 "/usr/include/bits/errno.h" 1 3 4
# 25 "/usr/include/bits/errno.h" 3 4
# 1 "/usr/include/linux/errno.h" 1 3 4



# 1 "/usr/include/asm/errno.h" 1 3 4




# 1 "/usr/include/asm-x86_64/errno.h" 1 3 4



# 1 "/usr/include/asm-generic/errno.h" 1 3 4



# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
# 5 "/usr/include/asm-generic/errno.h" 2 3 4
# 5 "/usr/include/asm-x86_64/errno.h" 2 3 4
# 6 "/usr/include/asm/errno.h" 2 3 4
# 5 "/usr/include/linux/errno.h" 2 3 4
# 26 "/usr/include/bits/errno.h" 2 3 4
# 43 "/usr/include/bits/errno.h" 3 4
extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
# 37 "/usr/include/errno.h" 2 3 4
# 55 "/usr/include/errno.h" 3 4
extern char *program_invocation_name, *program_invocation_short_name;




# 69 "/usr/include/errno.h" 3 4
typedef int error_t;
# 42 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 2



# 1 "/usr/include/math.h" 1 3 4
# 30 "/usr/include/math.h" 3 4




# 1 "/usr/include/bits/huge_val.h" 1 3 4
# 35 "/usr/include/math.h" 2 3 4

# 1 "/usr/include/bits/huge_valf.h" 1 3 4
# 37 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_vall.h" 1 3 4
# 38 "/usr/include/math.h" 2 3 4


# 1 "/usr/include/bits/inf.h" 1 3 4
# 41 "/usr/include/math.h" 2 3 4


# 1 "/usr/include/bits/nan.h" 1 3 4
# 44 "/usr/include/math.h" 2 3 4



# 1 "/usr/include/bits/mathdef.h" 1 3 4
# 26 "/usr/include/bits/mathdef.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 27 "/usr/include/bits/mathdef.h" 2 3 4




typedef float float_t;
typedef double double_t;
# 48 "/usr/include/math.h" 2 3 4
# 71 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__));

extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__));

extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__));

extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__));


extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__));

extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__));

extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__));




extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__));

extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__));

extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__));




extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__));






extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__));

extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__));

extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__));







extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__));


extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__));


extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__));


extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__));


extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__));


extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__));




extern double exp10 (double __x) __attribute__ ((__nothrow__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__));

extern double pow10 (double __x) __attribute__ ((__nothrow__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__));





extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__));


extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__));


extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__));






extern double exp2 (double __x) __attribute__ ((__nothrow__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__));


extern double log2 (double __x) __attribute__ ((__nothrow__)); extern double __log2 (double __x) __attribute__ ((__nothrow__));








extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__));


extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__));





extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__));






extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__));








extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__));




extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__));



extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__));





extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));






extern double nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__));
extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__));
extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__));
extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__));
extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__));
extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__));






extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__));
extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__));
extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__));






extern double tgamma (double) __attribute__ ((__nothrow__)); extern double __tgamma (double) __attribute__ ((__nothrow__));





extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__));






extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__));







extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__));


extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__));



extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__));



extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__));




extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__));



extern double nearbyint (double __x) __attribute__ ((__nothrow__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__));



extern double round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern double trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__));






extern long int lrint (double __x) __attribute__ ((__nothrow__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__));
extern long long int llrint (double __x) __attribute__ ((__nothrow__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__));



extern long int lround (double __x) __attribute__ ((__nothrow__)); extern long int __lround (double __x) __attribute__ ((__nothrow__));
extern long long int llround (double __x) __attribute__ ((__nothrow__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__));



extern double fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__));


extern double fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__));


extern double fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__));



extern int __fpclassify (double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));


extern int __signbit (double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));



extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__));








extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__));
# 72 "/usr/include/math.h" 2 3 4
# 94 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__));

extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__));

extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__));

extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__));


extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__));

extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__));

extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__));




extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__));

extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__));

extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__));




extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__));






extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__));

extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__));

extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__));







extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__));


extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__));


extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__));


extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__));


extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__));


extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__));




extern float exp10f (float __x) __attribute__ ((__nothrow__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__));

extern float pow10f (float __x) __attribute__ ((__nothrow__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__));





extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__));


extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__));


extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__));






extern float exp2f (float __x) __attribute__ ((__nothrow__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__));


extern float log2f (float __x) __attribute__ ((__nothrow__)); extern float __log2f (float __x) __attribute__ ((__nothrow__));








extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__));


extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__));





extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__));






extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__));








extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__));




extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__));



extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__));





extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));






extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__));
extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__));
extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__));
extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__));
extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__));
extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__));






extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__));
extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__));
extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__));






extern float tgammaf (float) __attribute__ ((__nothrow__)); extern float __tgammaf (float) __attribute__ ((__nothrow__));





extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__));






extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__));







extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__));


extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__));



extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__));



extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__));




extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__));



extern float nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__));



extern float roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern float truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__));






extern long int lrintf (float __x) __attribute__ ((__nothrow__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__));
extern long long int llrintf (float __x) __attribute__ ((__nothrow__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__));



extern long int lroundf (float __x) __attribute__ ((__nothrow__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__));
extern long long int llroundf (float __x) __attribute__ ((__nothrow__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__));



extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__));


extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__));


extern float fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__));



extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));


extern int __signbitf (float __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));



extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__));








extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__));
# 95 "/usr/include/math.h" 2 3 4
# 141 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__));

extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__));

extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__));

extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__));


extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__));

extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__));

extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__));




extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__));

extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__));

extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__));




extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__));






extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__));

extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__));

extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__));







extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__));


extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__));


extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__));


extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__));


extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__));


extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__));




extern long double exp10l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__));

extern long double pow10l (long double __x) __attribute__ ((__nothrow__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__));





extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__));


extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__));


extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__));






extern long double exp2l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__));


extern long double log2l (long double __x) __attribute__ ((__nothrow__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__));








extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__));


extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__));





extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__));






extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__));








extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__));




extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__));



extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__));





extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));






extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__));
extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__));
extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__));
extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__));
extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__));
extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__));






extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__));
extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__));
extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__));






extern long double tgammal (long double) __attribute__ ((__nothrow__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__));





extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__));






extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__));







extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__));


extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__));



extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__));



extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__));




extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__));



extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__));



extern long double roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern long double truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__));






extern long int lrintl (long double __x) __attribute__ ((__nothrow__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__));
extern long long int llrintl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__));



extern long int lroundl (long double __x) __attribute__ ((__nothrow__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__));
extern long long int llroundl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__));



extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__));


extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__));


extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__));



extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));


extern int __signbitl (long double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));



extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__));








extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__));
# 142 "/usr/include/math.h" 2 3 4
# 157 "/usr/include/math.h" 3 4
extern int signgam;
# 198 "/usr/include/math.h" 3 4
enum
  {
    FP_NAN,

    FP_INFINITE,

    FP_ZERO,

    FP_SUBNORMAL,

    FP_NORMAL

  };
# 284 "/usr/include/math.h" 3 4
typedef enum
{
  _IEEE_ = -1,
  _SVID_,
  _XOPEN_,
  _POSIX_,
  _ISOC_
} _LIB_VERSION_TYPE;




extern _LIB_VERSION_TYPE _LIB_VERSION;
# 309 "/usr/include/math.h" 3 4
struct exception

  {
    int type;
    char *name;
    double arg1;
    double arg2;
    double retval;
  };




extern int matherr (struct exception *__exc);
# 409 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathinline.h" 1 3 4
# 35 "/usr/include/bits/mathinline.h" 3 4
extern __inline int
__attribute__ ((__nothrow__)) __signbitf (float __x)
{
  __extension__ union { float __f; int __i; } __u = { __f: __x };
  return __u.__i < 0;
}
extern __inline int
__attribute__ ((__nothrow__)) __signbit (double __x)
{
  __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
  return __u.__i[1] < 0;
}
extern __inline int
__attribute__ ((__nothrow__)) __signbitl (long double __x)
{
  __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
  return (__u.__i[2] & 0x8000) != 0;
}
# 410 "/usr/include/math.h" 2 3 4
# 465 "/usr/include/math.h" 3 4

# 46 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 2
# 186 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h"
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h" 1
# 35 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h"
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/bswap.h" 1
# 38 "/usr/src/redhat/BUILD/ffmpeg/libavutil/bswap.h"
static __attribute__((always_inline)) inline uint16_t bswap_16(uint16_t x)
{
  __asm("rorw $8, %0" :
        "=Q" (x) :
        "0" (x));
    return x;
}

static __attribute__((always_inline)) inline uint32_t bswap_32(uint32_t x)
{

 __asm("bswap   %0":
      "=r" (x) :






      "0" (x));
  return x;
}

static inline uint64_t bswap_64(uint64_t x)
{

  __asm("bswap  %0":
        "=r" (x) :
        "0" (x));
  return x;
# 79 "/usr/src/redhat/BUILD/ffmpeg/libavutil/bswap.h"
}
# 36 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h" 2

# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 1 3 4
# 152 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 38 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h" 2
# 89 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h"
# 1 "/usr/include/assert.h" 1 3 4
# 90 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h" 2
# 104 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h"
extern const uint32_t inverse[256];
# 124 "/usr/src/redhat/BUILD/ffmpeg/libavutil/internal.h"
extern const uint8_t ff_sqrt_tab[128];

static inline int ff_sqrt(int a)
{
    int ret=0;
    int s;
    int ret_sq=0;

    if(a<128) return ff_sqrt_tab[a];

    for(s=15; s>=0; s--){
        int b= ret_sq + (1<<(s*2)) + (ret<<s)*2;
        if(b<=a){
            ret_sq=b;
            ret+= 1<<s;
        }
    }
    return ret;
}
# 187 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h" 2
# 201 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h"
extern const uint8_t ff_log2_tab[256];

static inline int av_log2(unsigned int v)
{
    int n;

    n = 0;
    if (v & 0xffff0000) {
        v >>= 16;
        n += 16;
    }
    if (v & 0xff00) {
        v >>= 8;
        n += 8;
    }
    n += ff_log2_tab[v];

    return n;
}

static inline int av_log2_16bit(unsigned int v)
{
    int n;

    n = 0;
    if (v & 0xff00) {
        v >>= 8;
        n += 8;
    }
    n += ff_log2_tab[v];

    return n;
}


static inline int mid_pred(int a, int b, int c)
{

    int i=a, j=a;
    asm volatile(
        "cmp    %4, %2 \n\t"
        "cmovg  %4, %0 \n\t"
        "cmovl  %4, %1 \n\t"
        "cmp    %4, %3 \n\t"
        "cmovg  %3, %0 \n\t"
        "cmovl  %3, %1 \n\t"
        "cmp    %3, %2 \n\t"
        "cmovl  %1, %0 \n\t"
        :"+&r"(i), "+&r"(j)
        :"r"(a), "r"(b), "r"(c)
    );
    return i;
# 275 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h"
}
# 284 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h"
static inline int clip(int a, int amin, int amax)
{
    if (a < amin) return amin;
    else if (a > amax) return amax;
    else return a;
}






static inline uint8_t clip_uint8(int a)
{
    if (a&(~255)) return (-a)>>31;
    else return a;
}


int64_t ff_gcd(int64_t a, int64_t b);




static inline int ff_get_fourcc(const char *s){

    ((void) (0));


    return (s[0]) + (s[1]<<8) + (s[2]<<16) + (s[3]<<24);
}
# 337 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h"
static inline uint64_t read_time(void)
{
        uint64_t a, d;
        asm volatile( "rdtsc\n\t"
                : "=a" (a), "=d" (d)
        );
        return (d << 32) | (a & 0xffffffff);
}
# 407 "/usr/src/redhat/BUILD/ffmpeg/libavutil/common.h"
void *av_malloc(unsigned int size);
void *av_realloc(void *ptr, unsigned int size);
void av_free(void *ptr);
# 43 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h" 2
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/mathematics.h" 1
# 22 "/usr/src/redhat/BUILD/ffmpeg/libavutil/mathematics.h"
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/rational.h" 1
# 33 "/usr/src/redhat/BUILD/ffmpeg/libavutil/rational.h"
typedef struct AVRational{
    int num;
    int den;
} AVRational;




static inline int av_cmp_q(AVRational a, AVRational b){
    const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;

    if(tmp) return (tmp>>63)|1;
    else return 0;
}




static inline double av_q2d(AVRational a){
    return a.num / (double) a.den;
}







int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max);

AVRational av_mul_q(AVRational b, AVRational c);
AVRational av_div_q(AVRational b, AVRational c);
AVRational av_add_q(AVRational b, AVRational c);
AVRational av_sub_q(AVRational b, AVRational c);
AVRational av_d2q(double d, int max);
# 23 "/usr/src/redhat/BUILD/ffmpeg/libavutil/mathematics.h" 2

enum AVRounding {
    AV_ROUND_ZERO = 0,
    AV_ROUND_INF = 1,
    AV_ROUND_DOWN = 2,
    AV_ROUND_UP = 3,
    AV_ROUND_NEAR_INF = 5,
};





int64_t av_rescale(int64_t a, int64_t b, int64_t c);





int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding);




int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq);
# 44 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h" 2

# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/integer.h" 1
# 32 "/usr/src/redhat/BUILD/ffmpeg/libavutil/integer.h"
typedef struct AVInteger{
    uint16_t v[8];
} AVInteger;

AVInteger av_add_i(AVInteger a, AVInteger b);
AVInteger av_sub_i(AVInteger a, AVInteger b);
int av_log2_i(AVInteger a);
AVInteger av_mul_i(AVInteger a, AVInteger b);
int av_cmp_i(AVInteger a, AVInteger b);
AVInteger av_shr_i(AVInteger a, int s);
AVInteger av_mod_i(AVInteger *quot, AVInteger a, AVInteger b);
AVInteger av_div_i(AVInteger a, AVInteger b);
AVInteger av_int2i(int64_t a);
int64_t av_i2int(AVInteger a);
# 46 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h" 2
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/intfloat_readwrite.h" 1
# 25 "/usr/src/redhat/BUILD/ffmpeg/libavutil/intfloat_readwrite.h"
typedef struct AVExtFloat {
    uint8_t exponent[2];
    uint8_t mantissa[8];
} AVExtFloat;

double av_int2dbl(int64_t v);
float av_int2flt(int32_t v);
double av_ext2dbl(const AVExtFloat ext);
int64_t av_dbl2int(double d);
int32_t av_flt2int(float d);
AVExtFloat av_dbl2ext(double d);
# 47 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h" 2
# 1 "/usr/src/redhat/BUILD/ffmpeg/libavutil/log.h" 1
# 22 "/usr/src/redhat/BUILD/ffmpeg/libavutil/log.h"
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stdarg.h" 1 3 4
# 23 "/usr/src/redhat/BUILD/ffmpeg/libavutil/log.h" 2




typedef struct AVCLASS AVClass;
struct AVCLASS {
    const char* class_name;
    const char* (*item_name)(void*);



    struct AVOption *option;
};







extern int av_log_level;


extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));





extern void av_vlog(void*, int level, const char *fmt, va_list);
extern int av_log_get_level(void);
extern void av_log_set_level(int);
extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
# 48 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h" 2
# 67 "/usr/src/redhat/BUILD/ffmpeg/libavutil/avutil.h"
enum PixelFormat {
    PIX_FMT_NONE= -1,
    PIX_FMT_YUV420P,
    PIX_FMT_YUYV422,
    PIX_FMT_RGB24,
    PIX_FMT_BGR24,
    PIX_FMT_YUV422P,
    PIX_FMT_YUV444P,
    PIX_FMT_RGB32,
    PIX_FMT_YUV410P,
    PIX_FMT_YUV411P,
    PIX_FMT_RGB565,
    PIX_FMT_RGB555,
    PIX_FMT_GRAY8,
    PIX_FMT_MONOWHITE,
    PIX_FMT_MONOBLACK,
    PIX_FMT_PAL8,
    PIX_FMT_YUVJ420P,
    PIX_FMT_YUVJ422P,
    PIX_FMT_YUVJ444P,
    PIX_FMT_XVMC_MPEG2_MC,
    PIX_FMT_XVMC_MPEG2_IDCT,
    PIX_FMT_UYVY422,
    PIX_FMT_UYYVYY411,
    PIX_FMT_BGR32,
    PIX_FMT_BGR565,
    PIX_FMT_BGR555,
    PIX_FMT_BGR8,
    PIX_FMT_BGR4,
    PIX_FMT_BGR4_BYTE,
    PIX_FMT_RGB8,
    PIX_FMT_RGB4,
    PIX_FMT_RGB4_BYTE,
    PIX_FMT_NV12,
    PIX_FMT_NV21,

    PIX_FMT_RGB32_1,
    PIX_FMT_BGR32_1,

    PIX_FMT_NB,
};
# 30 "swscale_internal.h" 2
# 46 "swscale_internal.h"
typedef int (*SwsFunc)(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]);


typedef struct SwsContext{




 SwsFunc swScale;
 int srcW, srcH, dstH;
 int chrSrcW, chrSrcH, chrDstW, chrDstH;
 int lumXInc, chrXInc;
 int lumYInc, chrYInc;
 int dstFormat, srcFormat;
 int origDstFormat, origSrcFormat;
 int chrSrcHSubSample, chrSrcVSubSample;
 int chrIntHSubSample, chrIntVSubSample;
 int chrDstHSubSample, chrDstVSubSample;
 int vChrDrop;
        int sliceDir;
 double param[2];

 int16_t **lumPixBuf;
 int16_t **chrPixBuf;
 int16_t *hLumFilter;
 int16_t *hLumFilterPos;
 int16_t *hChrFilter;
 int16_t *hChrFilterPos;
 int16_t *vLumFilter;
 int16_t *vLumFilterPos;
 int16_t *vChrFilter;
 int16_t *vChrFilterPos;

 uint8_t formatConvBuffer[4000];

 int hLumFilterSize;
 int hChrFilterSize;
 int vLumFilterSize;
 int vChrFilterSize;
 int vLumBufSize;
 int vChrBufSize;

 uint8_t *funnyYCode;
 uint8_t *funnyUVCode;
 int32_t *lumMmx2FilterPos;
 int32_t *chrMmx2FilterPos;
 int16_t *lumMmx2Filter;
 int16_t *chrMmx2Filter;

 int canMMX2BeUsed;

 int lastInLumBuf;
 int lastInChrBuf;
 int lumBufIndex;
 int chrBufIndex;
 int dstY;
 int flags;
 void * yuvTable;
 void * table_rV[256];
 void * table_gU[256];
 int table_gV[256];
 void * table_bU[256];


 int contrast, brightness, saturation;
 int srcColorspaceTable[4];
 int dstColorspaceTable[4];
 int srcRange, dstRange;
# 135 "swscale_internal.h"
 uint64_t redDither __attribute__((aligned(8)));
 uint64_t greenDither __attribute__((aligned(8)));
 uint64_t blueDither __attribute__((aligned(8)));

 uint64_t yCoeff __attribute__((aligned(8)));
 uint64_t vrCoeff __attribute__((aligned(8)));
 uint64_t ubCoeff __attribute__((aligned(8)));
 uint64_t vgCoeff __attribute__((aligned(8)));
 uint64_t ugCoeff __attribute__((aligned(8)));
 uint64_t yOffset __attribute__((aligned(8)));
 uint64_t uOffset __attribute__((aligned(8)));
 uint64_t vOffset __attribute__((aligned(8)));
 int32_t lumMmxFilter[4*256];
 int32_t chrMmxFilter[4*256];
 int dstW;
 uint64_t esp __attribute__((aligned(8)));
 uint64_t vRounder __attribute__((aligned(8)));
 uint64_t u_temp __attribute__((aligned(8)));
 uint64_t v_temp __attribute__((aligned(8)));
# 168 "swscale_internal.h"
} SwsContext;


SwsFunc yuv2rgb_get_func_ptr (SwsContext *c);
int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation);

char *sws_format_name(int format);
# 42 "yuv2rgb.c" 2
# 1 "../libmpcodecs/img_format.h" 1
# 110 "../libmpcodecs/img_format.h"
typedef struct {
    void* data;
    int size;
    int id;
    int timestamp;
} vo_mpegpes_t;

const char *vo_format_name(int format);
# 43 "yuv2rgb.c" 2







const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={
{ 1, 3, 1, 3, 1, 3, 1, 3, },
{ 2, 0, 2, 0, 2, 0, 2, 0, },
};

const uint8_t __attribute__((aligned(8))) dither_2x2_8[2][8]={
{ 6, 2, 6, 2, 6, 2, 6, 2, },
{ 0, 4, 0, 4, 0, 4, 0, 4, },
};

const uint8_t __attribute__((aligned(8))) dither_8x8_32[8][8]={
{ 17, 9, 23, 15, 16, 8, 22, 14, },
{ 5, 29, 3, 27, 4, 28, 2, 26, },
{ 21, 13, 19, 11, 20, 12, 18, 10, },
{ 0, 24, 6, 30, 1, 25, 7, 31, },
{ 16, 8, 22, 14, 17, 9, 23, 15, },
{ 4, 28, 2, 26, 5, 29, 3, 27, },
{ 20, 12, 18, 10, 21, 13, 19, 11, },
{ 1, 25, 7, 31, 0, 24, 6, 30, },
};
# 84 "yuv2rgb.c"
const uint8_t __attribute__((aligned(8))) dither_8x8_73[8][8]={
{ 0, 55, 14, 68, 3, 58, 17, 72, },
{ 37, 18, 50, 32, 40, 22, 54, 35, },
{ 9, 64, 5, 59, 13, 67, 8, 63, },
{ 46, 27, 41, 23, 49, 31, 44, 26, },
{ 2, 57, 16, 71, 1, 56, 15, 70, },
{ 39, 21, 52, 34, 38, 19, 51, 33, },
{ 11, 66, 7, 62, 10, 65, 6, 60, },
{ 48, 30, 43, 25, 47, 29, 42, 24, },
};
# 109 "yuv2rgb.c"
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
{117, 62, 158, 103, 113, 58, 155, 100, },
{ 34, 199, 21, 186, 31, 196, 17, 182, },
{144, 89, 131, 76, 141, 86, 127, 72, },
{ 0, 165, 41, 206, 10, 175, 52, 217, },
{110, 55, 151, 96, 120, 65, 162, 107, },
{ 28, 193, 14, 179, 38, 203, 24, 189, },
{138, 83, 124, 69, 148, 93, 134, 79, },
{ 7, 172, 48, 213, 3, 168, 45, 210, },
};
# 160 "yuv2rgb.c"
const uint64_t __attribute__((used)) __attribute__((aligned(8))) mmx_00ffw = 0x00ff00ff00ff00ffULL;
const uint64_t __attribute__((used)) __attribute__((aligned(8))) mmx_redmask = 0xf8f8f8f8f8f8f8f8ULL;
const uint64_t __attribute__((used)) __attribute__((aligned(8))) mmx_grnmask = 0xfcfcfcfcfcfcfcfcULL;

const uint64_t __attribute__((used)) __attribute__((aligned(8))) M24A= 0x00FF0000FF0000FFULL;
const uint64_t __attribute__((used)) __attribute__((aligned(8))) M24B= 0xFF0000FF0000FF00ULL;
const uint64_t __attribute__((used)) __attribute__((aligned(8))) M24C= 0x0000FF0000FF0000ULL;



volatile uint64_t __attribute__((used)) __attribute__((aligned(8))) b5Dither;
volatile uint64_t __attribute__((used)) __attribute__((aligned(8))) g5Dither;
volatile uint64_t __attribute__((used)) __attribute__((aligned(8))) g6Dither;
volatile uint64_t __attribute__((used)) __attribute__((aligned(8))) r5Dither;

uint64_t __attribute__((aligned(8))) dither4[2]={
 0x0103010301030103LL,
 0x0200020002000200LL,};

uint64_t __attribute__((aligned(8))) dither8[2]={
 0x0602060206020602LL,
 0x0004000400040004LL,};
# 191 "yuv2rgb.c"
# 1 "yuv2rgb_template.c" 1
# 126 "yuv2rgb_template.c"
static inline int yuv420_rgb16_MMX(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*2 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );


    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;

 b5Dither= dither8[y&1];
 g6Dither= dither4[y&1];
 g5Dither= dither8[y&1];
 r5Dither= dither8[(y+1)&1];


     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"






"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"


   "paddusb ""b5Dither""(%%rip)"", %%mm0;"
   "paddusb ""g6Dither""(%%rip)"", %%mm2;"
   "paddusb ""r5Dither""(%%rip)"", %%mm1;"


       "pand ""mmx_redmask""(%%rip)"", %%mm0;"
       "pand ""mmx_grnmask""(%%rip)"", %%mm2;"
       "pand ""mmx_redmask""(%%rip)"", %%mm1;"

       "psrlw $3,%%mm0;"
       "pxor %%mm4, %%mm4;"

       "movq %%mm0, %%mm5;"
       "movq %%mm2, %%mm7;"


       "punpcklbw %%mm4, %%mm2;"
       "punpcklbw %%mm1, %%mm0;"

       "psllw $3, %%mm2;"
       "por %%mm2, %%mm0;"

       "movq 8 (%5, %0, 2), %%mm6;"
       "movq" " %%mm0, (%1);"


       "punpckhbw %%mm4, %%mm7;"
       "punpckhbw %%mm1, %%mm5;"

       "psllw $3, %%mm7;"
       "movd 4 (%2, %0), %%mm0;"

       "por %%mm7, %%mm5;"
       "movd 4 (%3, %0), %%mm1;"

       "movq" " %%mm5, 8 (%1);"

       "add $16, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"

       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");

    return srcSliceH;
}

static inline int yuv420_rgb15_MMX(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*2 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );


    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;

 b5Dither= dither8[y&1];
 g6Dither= dither4[y&1];
 g5Dither= dither8[y&1];
 r5Dither= dither8[(y+1)&1];


     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"
"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"


   "paddusb ""b5Dither""(%%rip)"", %%mm0	\n\t"
   "paddusb ""g5Dither""(%%rip)"", %%mm2	\n\t"
   "paddusb ""r5Dither""(%%rip)"", %%mm1	\n\t"



       "pand ""mmx_redmask""(%%rip)"", %%mm0;"
       "pand ""mmx_redmask""(%%rip)"", %%mm2;"
       "pand ""mmx_redmask""(%%rip)"", %%mm1;"

       "psrlw $3,%%mm0;"
       "psrlw $1,%%mm1;"
       "pxor %%mm4, %%mm4;"

       "movq %%mm0, %%mm5;"
       "movq %%mm2, %%mm7;"


       "punpcklbw %%mm4, %%mm2;"
       "punpcklbw %%mm1, %%mm0;"

       "psllw $2, %%mm2;"
       "por %%mm2, %%mm0;"

       "movq 8 (%5, %0, 2), %%mm6;"
       "movq" " %%mm0, (%1);"


       "punpckhbw %%mm4, %%mm7;"
       "punpckhbw %%mm1, %%mm5;"

       "psllw $2, %%mm7;"
       "movd 4 (%2, %0), %%mm0;"

       "por %%mm7, %%mm5;"
       "movd 4 (%3, %0), %%mm1;"

       "movq" " %%mm5, 8 (%1);"

       "add $16, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"
       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");
    return srcSliceH;
}

static inline int yuv420_rgb24_MMX(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*3 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );

    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;



     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"
"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"
# 389 "yuv2rgb_template.c"
   "pxor %%mm4, %%mm4		\n\t"
   "movq %%mm0, %%mm5		\n\t"
   "movq %%mm1, %%mm6		\n\t"
   "punpcklbw %%mm2, %%mm0		\n\t"
   "punpcklbw %%mm4, %%mm1		\n\t"
   "punpckhbw %%mm2, %%mm5		\n\t"
   "punpckhbw %%mm4, %%mm6		\n\t"
   "movq %%mm0, %%mm7		\n\t"
   "movq %%mm5, %%mm3		\n\t"
   "punpcklwd %%mm1, %%mm7		\n\t"
   "punpckhwd %%mm1, %%mm0		\n\t"
   "punpcklwd %%mm6, %%mm5		\n\t"
   "punpckhwd %%mm6, %%mm3		\n\t"

   "movq %%mm7, %%mm2		\n\t"
   "movq %%mm0, %%mm6		\n\t"
   "movq %%mm5, %%mm1		\n\t"
   "movq %%mm3, %%mm4		\n\t"

   "psllq $40, %%mm7		\n\t"
   "psllq $40, %%mm0		\n\t"
   "psllq $40, %%mm5		\n\t"
   "psllq $40, %%mm3		\n\t"

   "punpckhdq %%mm2, %%mm7		\n\t"
   "punpckhdq %%mm6, %%mm0		\n\t"
   "punpckhdq %%mm1, %%mm5		\n\t"
   "punpckhdq %%mm4, %%mm3		\n\t"

   "psrlq $8, %%mm7		\n\t"
   "movq %%mm0, %%mm6		\n\t"
   "psllq $40, %%mm0		\n\t"
   "por %%mm0, %%mm7		\n\t"
   "movq"" %%mm7, (%1)		\n\t"

   "movd 4 (%2, %0), %%mm0;"

   "psrlq $24, %%mm6		\n\t"
   "movq %%mm5, %%mm1		\n\t"
   "psllq $24, %%mm5		\n\t"
   "por %%mm5, %%mm6		\n\t"
   "movq"" %%mm6, 8(%1)		\n\t"

   "movq 8 (%5, %0, 2), %%mm6;"

   "psrlq $40, %%mm1		\n\t"
   "psllq $8, %%mm3		\n\t"
   "por %%mm3, %%mm1		\n\t"
   "movq"" %%mm1, 16(%1)		\n\t"

   "movd 4 (%3, %0), %%mm1;"
   "pxor %%mm4, %%mm4		\n\t"


       "add $24, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"

       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");
    return srcSliceH;
}

static inline int yuv420_rgb32_MMX(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*4 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );

    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;



     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"
"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"




       "pxor %%mm3, %%mm3;"

       "movq %%mm0, %%mm6;"
       "movq %%mm1, %%mm7;"

       "movq %%mm0, %%mm4;"
       "movq %%mm1, %%mm5;"

       "punpcklbw %%mm2, %%mm6;"
       "punpcklbw %%mm3, %%mm7;"

       "punpcklwd %%mm7, %%mm6;"
       "movq" " %%mm6, (%1);"

       "movq %%mm0, %%mm6;"
       "punpcklbw %%mm2, %%mm6;"

       "punpckhwd %%mm7, %%mm6;"
       "movq" " %%mm6, 8 (%1);"

       "punpckhbw %%mm2, %%mm4;"
       "punpckhbw %%mm3, %%mm5;"

       "punpcklwd %%mm5, %%mm4;"
       "movq" " %%mm4, 16 (%1);"

       "movq %%mm0, %%mm4;"
       "punpckhbw %%mm2, %%mm4;"

       "punpckhwd %%mm5, %%mm4;"
       "movq" " %%mm4, 24 (%1);"

       "movd 4 (%2, %0), %%mm0;"
       "movd 4 (%3, %0), %%mm1;"

       "pxor %%mm4, %%mm4;"
       "movq 8 (%5, %0, 2), %%mm6;"

       "add $32, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"

       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");
    return srcSliceH;
}
# 192 "yuv2rgb.c" 2







# 1 "yuv2rgb_template.c" 1
# 126 "yuv2rgb_template.c"
static inline int yuv420_rgb16_MMX2(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*2 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );


    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;

 b5Dither= dither8[y&1];
 g6Dither= dither4[y&1];
 g5Dither= dither8[y&1];
 r5Dither= dither8[(y+1)&1];


     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"






"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"


   "paddusb ""b5Dither""(%%rip)"", %%mm0;"
   "paddusb ""g6Dither""(%%rip)"", %%mm2;"
   "paddusb ""r5Dither""(%%rip)"", %%mm1;"


       "pand ""mmx_redmask""(%%rip)"", %%mm0;"
       "pand ""mmx_grnmask""(%%rip)"", %%mm2;"
       "pand ""mmx_redmask""(%%rip)"", %%mm1;"

       "psrlw $3,%%mm0;"
       "pxor %%mm4, %%mm4;"

       "movq %%mm0, %%mm5;"
       "movq %%mm2, %%mm7;"


       "punpcklbw %%mm4, %%mm2;"
       "punpcklbw %%mm1, %%mm0;"

       "psllw $3, %%mm2;"
       "por %%mm2, %%mm0;"

       "movq 8 (%5, %0, 2), %%mm6;"
       "movntq" " %%mm0, (%1);"


       "punpckhbw %%mm4, %%mm7;"
       "punpckhbw %%mm1, %%mm5;"

       "psllw $3, %%mm7;"
       "movd 4 (%2, %0), %%mm0;"

       "por %%mm7, %%mm5;"
       "movd 4 (%3, %0), %%mm1;"

       "movntq" " %%mm5, 8 (%1);"

       "add $16, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"

       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");

    return srcSliceH;
}

static inline int yuv420_rgb15_MMX2(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*2 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );


    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;

 b5Dither= dither8[y&1];
 g6Dither= dither4[y&1];
 g5Dither= dither8[y&1];
 r5Dither= dither8[(y+1)&1];


     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"
"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"


   "paddusb ""b5Dither""(%%rip)"", %%mm0	\n\t"
   "paddusb ""g5Dither""(%%rip)"", %%mm2	\n\t"
   "paddusb ""r5Dither""(%%rip)"", %%mm1	\n\t"



       "pand ""mmx_redmask""(%%rip)"", %%mm0;"
       "pand ""mmx_redmask""(%%rip)"", %%mm2;"
       "pand ""mmx_redmask""(%%rip)"", %%mm1;"

       "psrlw $3,%%mm0;"
       "psrlw $1,%%mm1;"
       "pxor %%mm4, %%mm4;"

       "movq %%mm0, %%mm5;"
       "movq %%mm2, %%mm7;"


       "punpcklbw %%mm4, %%mm2;"
       "punpcklbw %%mm1, %%mm0;"

       "psllw $2, %%mm2;"
       "por %%mm2, %%mm0;"

       "movq 8 (%5, %0, 2), %%mm6;"
       "movntq" " %%mm0, (%1);"


       "punpckhbw %%mm4, %%mm7;"
       "punpckhbw %%mm1, %%mm5;"

       "psllw $2, %%mm7;"
       "movd 4 (%2, %0), %%mm0;"

       "por %%mm7, %%mm5;"
       "movd 4 (%3, %0), %%mm1;"

       "movntq" " %%mm5, 8 (%1);"

       "add $16, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"
       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");
    return srcSliceH;
}

static inline int yuv420_rgb24_MMX2(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*3 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );

    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;



     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"
"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"


   "movq ""M24A""(%%rip)"", %%mm4	\n\t"
   "movq ""M24C""(%%rip)"", %%mm7	\n\t"
   "pshufw $0x50, %%mm0, %%mm5	\n\t"
   "pshufw $0x50, %%mm2, %%mm3	\n\t"
   "pshufw $0x00, %%mm1, %%mm6	\n\t"

   "pand %%mm4, %%mm5		\n\t"
   "pand %%mm4, %%mm3		\n\t"
   "pand %%mm7, %%mm6		\n\t"

   "psllq $8, %%mm3		\n\t"
   "por %%mm5, %%mm6		\n\t"
   "por %%mm3, %%mm6		\n\t"
   "movntq"" %%mm6, (%1)		\n\t"

   "psrlq $8, %%mm2		\n\t"
   "pshufw $0xA5, %%mm0, %%mm5	\n\t"
   "pshufw $0x55, %%mm2, %%mm3	\n\t"
   "pshufw $0xA5, %%mm1, %%mm6	\n\t"

   "pand ""M24B""(%%rip)"", %%mm5	\n\t"
   "pand %%mm7, %%mm3		\n\t"
   "pand %%mm4, %%mm6		\n\t"

   "por %%mm5, %%mm3		\n\t"
   "por %%mm3, %%mm6		\n\t"
   "movntq"" %%mm6, 8(%1)		\n\t"

   "pshufw $0xFF, %%mm0, %%mm5	\n\t"
   "pshufw $0xFA, %%mm2, %%mm3	\n\t"
   "pshufw $0xFA, %%mm1, %%mm6	\n\t"
   "movd 4 (%2, %0), %%mm0;"

   "pand %%mm7, %%mm5		\n\t"
   "pand %%mm4, %%mm3		\n\t"
   "pand ""M24B""(%%rip)"", %%mm6	\n\t"
   "movd 4 (%3, %0), %%mm1;"

   "por %%mm5, %%mm3		\n\t"
   "por %%mm3, %%mm6		\n\t"
   "movntq"" %%mm6, 16(%1)		\n\t"
   "movq 8 (%5, %0, 2), %%mm6;"
   "pxor %%mm4, %%mm4		\n\t"
# 443 "yuv2rgb_template.c"
       "add $24, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"

       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");
    return srcSliceH;
}

static inline int yuv420_rgb32_MMX2(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
             int srcSliceH, uint8_t* dst[], int dstStride[]){
    int y, h_size;

    if(c->srcFormat == 0x50323234){
 srcStride[1] *= 2;
 srcStride[2] *= 2;
    }

    h_size= (c->dstW+7)&~7;
    if(h_size*4 > dstStride[0]) h_size-=8;

    __asm__ __volatile__ ("pxor %mm4, %mm4;" );

    for (y= 0; y<srcSliceH; y++ ) {
 uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
 uint8_t *_py = src[0] + y*srcStride[0];
 uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
 uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
 long index= -h_size/2;



     __asm__ __volatile__ (

       "movd (%2, %0), %%mm0;"
       "movd (%3, %0), %%mm1;"
       "movq (%5, %0, 2), %%mm6;"

      "1:				\n\t"
"punpcklbw %%mm4, %%mm0;" "punpcklbw %%mm4, %%mm1;" "psllw $3, %%mm0;" "psllw $3, %%mm1;" "psubsw ""9*8""(%4), %%mm0;" "psubsw ""10*8""(%4), %%mm1;" "movq %%mm0, %%mm2;" "movq %%mm1, %%mm3;" "pmulhw ""7*8""(%4), %%mm2;" "pmulhw ""6*8""(%4), %%mm3;" "pmulhw ""5*8""(%4), %%mm0;" "pmulhw ""4*8""(%4), %%mm1;" "paddsw %%mm3, %%mm2;" "movq %%mm6, %%mm7;" "pand ""mmx_00ffw""(%%rip)"", %%mm6;" "psrlw $8, %%mm7;" "psllw $3, %%mm6;" "psllw $3, %%mm7;" "psubw ""8*8""(%4), %%mm6;" "psubw ""8*8""(%4), %%mm7;" "pmulhw ""3*8""(%4), %%mm6;" "pmulhw ""3*8""(%4), %%mm7;" "movq %%mm0, %%mm3;" "movq %%mm1, %%mm4;" "movq %%mm2, %%mm5;" "paddsw %%mm6, %%mm0;" "paddsw %%mm7, %%mm3;" "paddsw %%mm6, %%mm1;" "paddsw %%mm7, %%mm4;" "paddsw %%mm6, %%mm2;" "paddsw %%mm7, %%mm5;" "packuswb %%mm0, %%mm0;" "packuswb %%mm1, %%mm1;" "packuswb %%mm2, %%mm2;" "packuswb %%mm3, %%mm3;" "packuswb %%mm4, %%mm4;" "packuswb %%mm5, %%mm5;" "punpcklbw %%mm3, %%mm0;" "punpcklbw %%mm4, %%mm1;" "punpcklbw %%mm5, %%mm2;"




       "pxor %%mm3, %%mm3;"

       "movq %%mm0, %%mm6;"
       "movq %%mm1, %%mm7;"

       "movq %%mm0, %%mm4;"
       "movq %%mm1, %%mm5;"

       "punpcklbw %%mm2, %%mm6;"
       "punpcklbw %%mm3, %%mm7;"

       "punpcklwd %%mm7, %%mm6;"
       "movntq" " %%mm6, (%1);"

       "movq %%mm0, %%mm6;"
       "punpcklbw %%mm2, %%mm6;"

       "punpckhwd %%mm7, %%mm6;"
       "movntq" " %%mm6, 8 (%1);"

       "punpckhbw %%mm2, %%mm4;"
       "punpckhbw %%mm3, %%mm5;"

       "punpcklwd %%mm5, %%mm4;"
       "movntq" " %%mm4, 16 (%1);"

       "movq %%mm0, %%mm4;"
       "punpckhbw %%mm2, %%mm4;"

       "punpckhwd %%mm5, %%mm4;"
       "movntq" " %%mm4, 24 (%1);"

       "movd 4 (%2, %0), %%mm0;"
       "movd 4 (%3, %0), %%mm1;"

       "pxor %%mm4, %%mm4;"
       "movq 8 (%5, %0, 2), %%mm6;"

       "add $32, %1			\n\t"
       "add $4, %0			\n\t"
       " js 1b				\n\t"

       : "+r" (index), "+r" (_image)
       : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
       );
    }

    __asm__ __volatile__ ("emms");
    return srcSliceH;
}
# 200 "yuv2rgb.c" 2



const int32_t Inverse_Table_6_9[8][4] = {
    {117504, 138453, 13954, 34903},
    {117504, 138453, 13954, 34903},
    {104597, 132201, 25675, 53279},
    {104597, 132201, 25675, 53279},
    {104448, 132798, 24759, 53109},
    {104597, 132201, 25675, 53279},
    {104597, 132201, 25675, 53279},
    {117579, 136230, 16907, 35559}
};
# 290 "yuv2rgb.c"
static int yuv2rgb_c_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint32_t *dst_1= (uint32_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint32_t *dst_2= (uint32_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint32_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[2*0] = r[Y] + g[Y] + b[Y]; Y = py_1[2*0 +1]; dst_1[2*0 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*0]; dst_2[2*0] = r[Y] + g[Y] + b[Y]; Y = py_2[2*0 +1]; dst_2[2*0 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[2*1] = r[Y] + g[Y] + b[Y]; Y = py_2[2*1 +1]; dst_2[2*1 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*1]; dst_1[2*1] = r[Y] + g[Y] + b[Y]; Y = py_1[2*1 +1]; dst_1[2*1 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[2*2] = r[Y] + g[Y] + b[Y]; Y = py_1[2*2 +1]; dst_1[2*2 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*2]; dst_2[2*2] = r[Y] + g[Y] + b[Y]; Y = py_2[2*2 +1]; dst_2[2*2 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[2*3] = r[Y] + g[Y] + b[Y]; Y = py_2[2*3 +1]; dst_2[2*3 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*3]; dst_1[2*3] = r[Y] + g[Y] + b[Y]; Y = py_1[2*3 +1]; dst_1[2*3 +1] = r[Y] + g[Y] + b[Y];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 8; dst_2 += 8; } } return srcSliceH;}

static int yuv2rgb_c_24_rgb(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[6*0] = r[Y]; dst_1[6*0 +1] = g[Y]; dst_1[6*0 +2] = b[Y]; Y = py_1[2*0 +1]; dst_1[6*0 +3] = r[Y]; dst_1[6*0 +4] = g[Y]; dst_1[6*0 +5] = b[Y];;
 Y = py_2[2*0]; dst_2[6*0] = r[Y]; dst_2[6*0 +1] = g[Y]; dst_2[6*0 +2] = b[Y]; Y = py_2[2*0 +1]; dst_2[6*0 +3] = r[Y]; dst_2[6*0 +4] = g[Y]; dst_2[6*0 +5] = b[Y];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[6*1] = r[Y]; dst_2[6*1 +1] = g[Y]; dst_2[6*1 +2] = b[Y]; Y = py_2[2*1 +1]; dst_2[6*1 +3] = r[Y]; dst_2[6*1 +4] = g[Y]; dst_2[6*1 +5] = b[Y];;
 Y = py_1[2*1]; dst_1[6*1] = r[Y]; dst_1[6*1 +1] = g[Y]; dst_1[6*1 +2] = b[Y]; Y = py_1[2*1 +1]; dst_1[6*1 +3] = r[Y]; dst_1[6*1 +4] = g[Y]; dst_1[6*1 +5] = b[Y];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[6*2] = r[Y]; dst_1[6*2 +1] = g[Y]; dst_1[6*2 +2] = b[Y]; Y = py_1[2*2 +1]; dst_1[6*2 +3] = r[Y]; dst_1[6*2 +4] = g[Y]; dst_1[6*2 +5] = b[Y];;
 Y = py_2[2*2]; dst_2[6*2] = r[Y]; dst_2[6*2 +1] = g[Y]; dst_2[6*2 +2] = b[Y]; Y = py_2[2*2 +1]; dst_2[6*2 +3] = r[Y]; dst_2[6*2 +4] = g[Y]; dst_2[6*2 +5] = b[Y];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[6*3] = r[Y]; dst_2[6*3 +1] = g[Y]; dst_2[6*3 +2] = b[Y]; Y = py_2[2*3 +1]; dst_2[6*3 +3] = r[Y]; dst_2[6*3 +4] = g[Y]; dst_2[6*3 +5] = b[Y];;
 Y = py_1[2*3]; dst_1[6*3] = r[Y]; dst_1[6*3 +1] = g[Y]; dst_1[6*3 +2] = b[Y]; Y = py_1[2*3 +1]; dst_1[6*3 +3] = r[Y]; dst_1[6*3 +4] = g[Y]; dst_1[6*3 +5] = b[Y];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 24; dst_2 += 24; } } return srcSliceH;}


static int yuv2rgb_c_24_bgr(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[6*0] = b[Y]; dst_1[6*0 +1] = g[Y]; dst_1[6*0 +2] = r[Y]; Y = py_1[2*0 +1]; dst_1[6*0 +3] = b[Y]; dst_1[6*0 +4] = g[Y]; dst_1[6*0 +5] = r[Y];;
 Y = py_2[2*0]; dst_2[6*0] = b[Y]; dst_2[6*0 +1] = g[Y]; dst_2[6*0 +2] = r[Y]; Y = py_2[2*0 +1]; dst_2[6*0 +3] = b[Y]; dst_2[6*0 +4] = g[Y]; dst_2[6*0 +5] = r[Y];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[6*1] = b[Y]; dst_2[6*1 +1] = g[Y]; dst_2[6*1 +2] = r[Y]; Y = py_2[2*1 +1]; dst_2[6*1 +3] = b[Y]; dst_2[6*1 +4] = g[Y]; dst_2[6*1 +5] = r[Y];;
 Y = py_1[2*1]; dst_1[6*1] = b[Y]; dst_1[6*1 +1] = g[Y]; dst_1[6*1 +2] = r[Y]; Y = py_1[2*1 +1]; dst_1[6*1 +3] = b[Y]; dst_1[6*1 +4] = g[Y]; dst_1[6*1 +5] = r[Y];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[6*2] = b[Y]; dst_1[6*2 +1] = g[Y]; dst_1[6*2 +2] = r[Y]; Y = py_1[2*2 +1]; dst_1[6*2 +3] = b[Y]; dst_1[6*2 +4] = g[Y]; dst_1[6*2 +5] = r[Y];;
 Y = py_2[2*2]; dst_2[6*2] = b[Y]; dst_2[6*2 +1] = g[Y]; dst_2[6*2 +2] = r[Y]; Y = py_2[2*2 +1]; dst_2[6*2 +3] = b[Y]; dst_2[6*2 +4] = g[Y]; dst_2[6*2 +5] = r[Y];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[6*3] = b[Y]; dst_2[6*3 +1] = g[Y]; dst_2[6*3 +2] = r[Y]; Y = py_2[2*3 +1]; dst_2[6*3 +3] = b[Y]; dst_2[6*3 +4] = g[Y]; dst_2[6*3 +5] = r[Y];;
 Y = py_1[2*3]; dst_1[6*3] = b[Y]; dst_1[6*3 +1] = g[Y]; dst_1[6*3 +2] = r[Y]; Y = py_1[2*3 +1]; dst_1[6*3 +3] = b[Y]; dst_1[6*3 +4] = g[Y]; dst_1[6*3 +5] = r[Y];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 24; dst_2 += 24; } } return srcSliceH;}



static int yuv2rgb_c_16(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint16_t *dst_1= (uint16_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint16_t *dst_2= (uint16_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint16_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[2*0] = r[Y] + g[Y] + b[Y]; Y = py_1[2*0 +1]; dst_1[2*0 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*0]; dst_2[2*0] = r[Y] + g[Y] + b[Y]; Y = py_2[2*0 +1]; dst_2[2*0 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[2*1] = r[Y] + g[Y] + b[Y]; Y = py_2[2*1 +1]; dst_2[2*1 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*1]; dst_1[2*1] = r[Y] + g[Y] + b[Y]; Y = py_1[2*1 +1]; dst_1[2*1 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[2*2] = r[Y] + g[Y] + b[Y]; Y = py_1[2*2 +1]; dst_1[2*2 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*2]; dst_2[2*2] = r[Y] + g[Y] + b[Y]; Y = py_2[2*2 +1]; dst_2[2*2 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[2*3] = r[Y] + g[Y] + b[Y]; Y = py_2[2*3 +1]; dst_2[2*3 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*3]; dst_1[2*3] = r[Y] + g[Y] + b[Y]; Y = py_1[2*3 +1]; dst_1[2*3 +1] = r[Y] + g[Y] + b[Y];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 8; dst_2 += 8; } } return srcSliceH;}



static int yuv2rgb_c_8(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[2*0] = r[Y] + g[Y] + b[Y]; Y = py_1[2*0 +1]; dst_1[2*0 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*0]; dst_2[2*0] = r[Y] + g[Y] + b[Y]; Y = py_2[2*0 +1]; dst_2[2*0 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[2*1] = r[Y] + g[Y] + b[Y]; Y = py_2[2*1 +1]; dst_2[2*1 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*1]; dst_1[2*1] = r[Y] + g[Y] + b[Y]; Y = py_1[2*1 +1]; dst_1[2*1 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[2*2] = r[Y] + g[Y] + b[Y]; Y = py_1[2*2 +1]; dst_1[2*2 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*2]; dst_2[2*2] = r[Y] + g[Y] + b[Y]; Y = py_2[2*2 +1]; dst_2[2*2 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[2*3] = r[Y] + g[Y] + b[Y]; Y = py_2[2*3 +1]; dst_2[2*3 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*3]; dst_1[2*3] = r[Y] + g[Y] + b[Y]; Y = py_1[2*3 +1]; dst_1[2*3 +1] = r[Y] + g[Y] + b[Y];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 8; dst_2 += 8; } } return srcSliceH;}


static int yuv2rgb_c_8_ordered_dither(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 const uint8_t *d32= dither_8x8_32[y&7];
 const uint8_t *d64= dither_8x8_73[y&7];
# 402 "yuv2rgb.c"
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[2*0] = r[Y+d32[0+0]] + g[Y+d32[0+0]] + b[Y+d64[0+0]]; Y = py_1[2*0 +1]; dst_1[2*0 +1] = r[Y+d32[1+0]] + g[Y+d32[1+0]] + b[Y+d64[1+0]];;
 Y = py_2[2*0]; dst_2[2*0] = r[Y+d32[8+0]] + g[Y+d32[8+0]] + b[Y+d64[8+0]]; Y = py_2[2*0 +1]; dst_2[2*0 +1] = r[Y+d32[9+0]] + g[Y+d32[9+0]] + b[Y+d64[9+0]];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[2*1] = r[Y+d32[8+2]] + g[Y+d32[8+2]] + b[Y+d64[8+2]]; Y = py_2[2*1 +1]; dst_2[2*1 +1] = r[Y+d32[9+2]] + g[Y+d32[9+2]] + b[Y+d64[9+2]];;
 Y = py_1[2*1]; dst_1[2*1] = r[Y+d32[0+2]] + g[Y+d32[0+2]] + b[Y+d64[0+2]]; Y = py_1[2*1 +1]; dst_1[2*1 +1] = r[Y+d32[1+2]] + g[Y+d32[1+2]] + b[Y+d64[1+2]];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[2*2] = r[Y+d32[0+4]] + g[Y+d32[0+4]] + b[Y+d64[0+4]]; Y = py_1[2*2 +1]; dst_1[2*2 +1] = r[Y+d32[1+4]] + g[Y+d32[1+4]] + b[Y+d64[1+4]];;
 Y = py_2[2*2]; dst_2[2*2] = r[Y+d32[8+4]] + g[Y+d32[8+4]] + b[Y+d64[8+4]]; Y = py_2[2*2 +1]; dst_2[2*2 +1] = r[Y+d32[9+4]] + g[Y+d32[9+4]] + b[Y+d64[9+4]];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[2*3] = r[Y+d32[8+6]] + g[Y+d32[8+6]] + b[Y+d64[8+6]]; Y = py_2[2*3 +1]; dst_2[2*3 +1] = r[Y+d32[9+6]] + g[Y+d32[9+6]] + b[Y+d64[9+6]];;
 Y = py_1[2*3]; dst_1[2*3] = r[Y+d32[0+6]] + g[Y+d32[0+6]] + b[Y+d64[0+6]]; Y = py_1[2*3 +1]; dst_1[2*3 +1] = r[Y+d32[1+6]] + g[Y+d32[1+6]] + b[Y+d64[1+6]];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 8; dst_2 += 8; } } return srcSliceH;}




static int yuv2rgb_c_4(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
        int acc;
# 438 "yuv2rgb.c"
        U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; acc = r[Y] + g[Y] + b[Y]; Y = py_1[2*0 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_1[0] = acc;;
 Y = py_2[2*0]; acc = r[Y] + g[Y] + b[Y]; Y = py_2[2*0 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_2[0] = acc;;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; acc = r[Y] + g[Y] + b[Y]; Y = py_2[2*1 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_2[1] = acc;;
 Y = py_1[2*1]; acc = r[Y] + g[Y] + b[Y]; Y = py_1[2*1 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_1[1] = acc;;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; acc = r[Y] + g[Y] + b[Y]; Y = py_1[2*2 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_1[2] = acc;;
 Y = py_2[2*2]; acc = r[Y] + g[Y] + b[Y]; Y = py_2[2*2 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_2[2] = acc;;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; acc = r[Y] + g[Y] + b[Y]; Y = py_2[2*3 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_2[3] = acc;;
 Y = py_1[2*3]; acc = r[Y] + g[Y] + b[Y]; Y = py_1[2*3 +1]; acc |= (r[Y] + g[Y] + b[Y])<<4; dst_1[3] = acc;;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 4; dst_2 += 4; } } return srcSliceH;}

static int yuv2rgb_c_4_ordered_dither(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 const uint8_t *d64= dither_8x8_73[y&7];
 const uint8_t *d128=dither_8x8_220[y&7];
        int acc;
# 475 "yuv2rgb.c"
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; acc = r[Y+d128[0+0]] + g[Y+d64[0+0]] + b[Y+d128[0+0]]; Y = py_1[2*0 +1]; acc |= (r[Y+d128[1+0]] + g[Y+d64[1+0]] + b[Y+d128[1+0]])<<4; dst_1[0]= acc;;
 Y = py_2[2*0]; acc = r[Y+d128[8+0]] + g[Y+d64[8+0]] + b[Y+d128[8+0]]; Y = py_2[2*0 +1]; acc |= (r[Y+d128[9+0]] + g[Y+d64[9+0]] + b[Y+d128[9+0]])<<4; dst_2[0]= acc;;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; acc = r[Y+d128[8+2]] + g[Y+d64[8+2]] + b[Y+d128[8+2]]; Y = py_2[2*1 +1]; acc |= (r[Y+d128[9+2]] + g[Y+d64[9+2]] + b[Y+d128[9+2]])<<4; dst_2[1]= acc;;
 Y = py_1[2*1]; acc = r[Y+d128[0+2]] + g[Y+d64[0+2]] + b[Y+d128[0+2]]; Y = py_1[2*1 +1]; acc |= (r[Y+d128[1+2]] + g[Y+d64[1+2]] + b[Y+d128[1+2]])<<4; dst_1[1]= acc;;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; acc = r[Y+d128[0+4]] + g[Y+d64[0+4]] + b[Y+d128[0+4]]; Y = py_1[2*2 +1]; acc |= (r[Y+d128[1+4]] + g[Y+d64[1+4]] + b[Y+d128[1+4]])<<4; dst_1[2]= acc;;
 Y = py_2[2*2]; acc = r[Y+d128[8+4]] + g[Y+d64[8+4]] + b[Y+d128[8+4]]; Y = py_2[2*2 +1]; acc |= (r[Y+d128[9+4]] + g[Y+d64[9+4]] + b[Y+d128[9+4]])<<4; dst_2[2]= acc;;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; acc = r[Y+d128[8+6]] + g[Y+d64[8+6]] + b[Y+d128[8+6]]; Y = py_2[2*3 +1]; acc |= (r[Y+d128[9+6]] + g[Y+d64[9+6]] + b[Y+d128[9+6]])<<4; dst_2[3]= acc;;
 Y = py_1[2*3]; acc = r[Y+d128[0+6]] + g[Y+d64[0+6]] + b[Y+d128[0+6]]; Y = py_1[2*3 +1]; acc |= (r[Y+d128[1+6]] + g[Y+d64[1+6]] + b[Y+d128[1+6]])<<4; dst_1[3]= acc;;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 4; dst_2 += 4; } } return srcSliceH;}



static int yuv2rgb_c_4b(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[2*0] = r[Y] + g[Y] + b[Y]; Y = py_1[2*0 +1]; dst_1[2*0 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*0]; dst_2[2*0] = r[Y] + g[Y] + b[Y]; Y = py_2[2*0 +1]; dst_2[2*0 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[2*1] = r[Y] + g[Y] + b[Y]; Y = py_2[2*1 +1]; dst_2[2*1 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*1]; dst_1[2*1] = r[Y] + g[Y] + b[Y]; Y = py_1[2*1 +1]; dst_1[2*1 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[2*2] = r[Y] + g[Y] + b[Y]; Y = py_1[2*2 +1]; dst_1[2*2 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_2[2*2]; dst_2[2*2] = r[Y] + g[Y] + b[Y]; Y = py_2[2*2 +1]; dst_2[2*2 +1] = r[Y] + g[Y] + b[Y];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[2*3] = r[Y] + g[Y] + b[Y]; Y = py_2[2*3 +1]; dst_2[2*3 +1] = r[Y] + g[Y] + b[Y];;
 Y = py_1[2*3]; dst_1[2*3] = r[Y] + g[Y] + b[Y]; Y = py_1[2*3 +1]; dst_1[2*3 +1] = r[Y] + g[Y] + b[Y];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 8; dst_2 += 8; } } return srcSliceH;}

static int yuv2rgb_c_4b_ordered_dither(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 const uint8_t *d64= dither_8x8_73[y&7];
 const uint8_t *d128=dither_8x8_220[y&7];
# 529 "yuv2rgb.c"
 U = pu[0]; V = pv[0]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*0]; dst_1[2*0] = r[Y+d128[0+0]] + g[Y+d64[0+0]] + b[Y+d128[0+0]]; Y = py_1[2*0 +1]; dst_1[2*0 +1] = r[Y+d128[1+0]] + g[Y+d64[1+0]] + b[Y+d128[1+0]];;
 Y = py_2[2*0]; dst_2[2*0] = r[Y+d128[8+0]] + g[Y+d64[8+0]] + b[Y+d128[8+0]]; Y = py_2[2*0 +1]; dst_2[2*0 +1] = r[Y+d128[9+0]] + g[Y+d64[9+0]] + b[Y+d128[9+0]];;

 U = pu[1]; V = pv[1]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*1]; dst_2[2*1] = r[Y+d128[8+2]] + g[Y+d64[8+2]] + b[Y+d128[8+2]]; Y = py_2[2*1 +1]; dst_2[2*1 +1] = r[Y+d128[9+2]] + g[Y+d64[9+2]] + b[Y+d128[9+2]];;
 Y = py_1[2*1]; dst_1[2*1] = r[Y+d128[0+2]] + g[Y+d64[0+2]] + b[Y+d128[0+2]]; Y = py_1[2*1 +1]; dst_1[2*1 +1] = r[Y+d128[1+2]] + g[Y+d64[1+2]] + b[Y+d128[1+2]];;

 U = pu[2]; V = pv[2]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_1[2*2]; dst_1[2*2] = r[Y+d128[0+4]] + g[Y+d64[0+4]] + b[Y+d128[0+4]]; Y = py_1[2*2 +1]; dst_1[2*2 +1] = r[Y+d128[1+4]] + g[Y+d64[1+4]] + b[Y+d128[1+4]];;
 Y = py_2[2*2]; dst_2[2*2] = r[Y+d128[8+4]] + g[Y+d64[8+4]] + b[Y+d128[8+4]]; Y = py_2[2*2 +1]; dst_2[2*2 +1] = r[Y+d128[9+4]] + g[Y+d64[9+4]] + b[Y+d128[9+4]];;

 U = pu[3]; V = pv[3]; r = c->table_rV[V]; g = c->table_gU[U] + c->table_gV[V]; b = c->table_bU[U];;
 Y = py_2[2*3]; dst_2[2*3] = r[Y+d128[8+6]] + g[Y+d64[8+6]] + b[Y+d128[8+6]]; Y = py_2[2*3 +1]; dst_2[2*3 +1] = r[Y+d128[9+6]] + g[Y+d64[9+6]] + b[Y+d128[9+6]];;
 Y = py_1[2*3]; dst_1[2*3] = r[Y+d128[0+6]] + g[Y+d64[0+6]] + b[Y+d128[0+6]]; Y = py_1[2*3 +1]; dst_1[2*3 +1] = r[Y+d128[1+6]] + g[Y+d64[1+6]] + b[Y+d128[1+6]];;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 8; dst_2 += 8; } } return srcSliceH;}

static int yuv2rgb_c_1_ordered_dither(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y; if(c->srcFormat == 0x50323234){ srcStride[1] *= 2; srcStride[2] *= 2; } for(y=0; y<srcSliceH; y+=2){ uint8_t *dst_1= (uint8_t*)(dst[0] + (y+srcSliceY )*dstStride[0]); uint8_t *dst_2= (uint8_t*)(dst[0] + (y+srcSliceY+1)*dstStride[0]); uint8_t *r, *g, *b; uint8_t *py_1= src[0] + y*srcStride[0]; uint8_t *py_2= py_1 + srcStride[0]; uint8_t *pu= src[1] + (y>>1)*srcStride[1]; uint8_t *pv= src[2] + (y>>1)*srcStride[2]; unsigned int h_size= c->dstW>>3; while (h_size--) { int U, V, Y;
 const uint8_t *d128=dither_8x8_220[y&7];
 char out_1=0, out_2=0;
 g= c->table_gU[128] + c->table_gV[128];
# 563 "yuv2rgb.c"
 Y = py_1[2*0]; out_1+= out_1 + g[Y+d128[0+0]]; Y = py_1[2*0 +1]; out_1+= out_1 + g[Y+d128[1+0]];;
 Y = py_2[2*0]; out_2+= out_2 + g[Y+d128[8+0]]; Y = py_2[2*0 +1]; out_2+= out_2 + g[Y+d128[9+0]];;

 Y = py_2[2*1]; out_2+= out_2 + g[Y+d128[8+2]]; Y = py_2[2*1 +1]; out_2+= out_2 + g[Y+d128[9+2]];;
 Y = py_1[2*1]; out_1+= out_1 + g[Y+d128[0+2]]; Y = py_1[2*1 +1]; out_1+= out_1 + g[Y+d128[1+2]];;

 Y = py_1[2*2]; out_1+= out_1 + g[Y+d128[0+4]]; Y = py_1[2*2 +1]; out_1+= out_1 + g[Y+d128[1+4]];;
 Y = py_2[2*2]; out_2+= out_2 + g[Y+d128[8+4]]; Y = py_2[2*2 +1]; out_2+= out_2 + g[Y+d128[9+4]];;

 Y = py_2[2*3]; out_2+= out_2 + g[Y+d128[8+6]]; Y = py_2[2*3 +1]; out_2+= out_2 + g[Y+d128[9+6]];;
 Y = py_1[2*3]; out_1+= out_1 + g[Y+d128[0+6]]; Y = py_1[2*3 +1]; out_1+= out_1 + g[Y+d128[1+6]];;

 dst_1[0]= out_1;
 dst_2[0]= out_2;
pu += 4; pv += 4; py_1 += 8; py_2 += 8; dst_1 += 1; dst_2 += 1; } } return srcSliceH;}

SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
{

    if(c->flags & 0x20000000){
 switch(c->dstFormat){
 case ((('B'<<24)|('G'<<16)|('R'<<8))|32): return yuv420_rgb32_MMX2;
 case ((('B'<<24)|('G'<<16)|('R'<<8))|24): return yuv420_rgb24_MMX2;
 case ((('B'<<24)|('G'<<16)|('R'<<8))|16): return yuv420_rgb16_MMX2;
 case ((('B'<<24)|('G'<<16)|('R'<<8))|15): return yuv420_rgb15_MMX2;
 }
    }
    if(c->flags & 0x80000000){
 switch(c->dstFormat){
 case ((('B'<<24)|('G'<<16)|('R'<<8))|32): return yuv420_rgb32_MMX;
 case ((('B'<<24)|('G'<<16)|('R'<<8))|24): return yuv420_rgb24_MMX;
 case ((('B'<<24)|('G'<<16)|('R'<<8))|16): return yuv420_rgb16_MMX;
 case ((('B'<<24)|('G'<<16)|('R'<<8))|15): return yuv420_rgb15_MMX;
 }
    }
# 613 "yuv2rgb.c"
    av_log(((void *)0), 2,"No accelerated colorspace conversion found\n" );

    switch(c->dstFormat){
    case ((('R'<<24)|('G'<<16)|('B'<<8))|32):
    case ((('B'<<24)|('G'<<16)|('R'<<8))|32): return yuv2rgb_c_32;
    case ((('R'<<24)|('G'<<16)|('B'<<8))|24): return yuv2rgb_c_24_rgb;
    case ((('B'<<24)|('G'<<16)|('R'<<8))|24): return yuv2rgb_c_24_bgr;
    case ((('R'<<24)|('G'<<16)|('B'<<8))|16):
    case ((('B'<<24)|('G'<<16)|('R'<<8))|16):
    case ((('R'<<24)|('G'<<16)|('B'<<8))|15):
    case ((('B'<<24)|('G'<<16)|('R'<<8))|15): return yuv2rgb_c_16;
    case ((('R'<<24)|('G'<<16)|('B'<<8))|8):
    case ((('B'<<24)|('G'<<16)|('R'<<8))|8): return yuv2rgb_c_8_ordered_dither;
    case ((('R'<<24)|('G'<<16)|('B'<<8))|4):
    case ((('B'<<24)|('G'<<16)|('R'<<8))|4): return yuv2rgb_c_4_ordered_dither;
    case ((('R'<<24)|('G'<<16)|('B'<<8))|4|128):
    case ((('B'<<24)|('G'<<16)|('R'<<8))|4|128): return yuv2rgb_c_4b_ordered_dither;
    case ((('R'<<24)|('G'<<16)|('B'<<8))|1):
    case ((('B'<<24)|('G'<<16)|('R'<<8))|1): return yuv2rgb_c_1_ordered_dither;
    default:
     ((void) (0));
    }
    return ((void *)0);
}

static int div_round (int dividend, int divisor)
{
    if (dividend > 0)
 return (dividend + (divisor>>1)) / divisor;
    else
 return -((-dividend + (divisor>>1)) / divisor);
}

int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation)
{
    const int isRgb = (((c->dstFormat)&0xFFFFFF00)==(('B'<<24)|('G'<<16)|('R'<<8)));
    const int bpp = isRgb?((c->dstFormat)&0x3F):((c->dstFormat)&0x3F);
    int i;
    uint8_t table_Y[1024];
    uint32_t *table_32 = 0;
    uint16_t *table_16 = 0;
    uint8_t *table_8 = 0;
    uint8_t *table_332 = 0;
    uint8_t *table_121 = 0;
    uint8_t *table_1 = 0;
    int entry_size = 0;
    void *table_r = 0, *table_g = 0, *table_b = 0;
    void *table_start;

    int64_t crv = inv_table[0];
    int64_t cbu = inv_table[1];
    int64_t cgu = -inv_table[2];
    int64_t cgv = -inv_table[3];
    int64_t cy = 1<<16;
    int64_t oy = 0;


    if(!fullRange){
 cy= (cy*255) / 219;
 oy= 16<<16;
    }

    cy = (cy *contrast )>>16;
    crv= (crv*contrast * saturation)>>32;
    cbu= (cbu*contrast * saturation)>>32;
    cgu= (cgu*contrast * saturation)>>32;
    cgv= (cgv*contrast * saturation)>>32;

    oy -= 256*brightness;

    for (i = 0; i < 1024; i++) {
 int j;

 j= (cy*(((i - 384)<<16) - oy) + (1<<31))>>32;
 j = (j < 0) ? 0 : ((j > 255) ? 255 : j);
 table_Y[i] = j;
    }

    switch (bpp) {
    case 32:
 table_start= table_32 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint32_t));

 entry_size = sizeof (uint32_t);
 table_r = table_32 + 197;
 table_b = table_32 + 197 + 685;
 table_g = table_32 + 197 + 2*682;

 for (i = -197; i < 256+197; i++)
     ((uint32_t *)table_r)[i] = table_Y[i+384] << (isRgb ? 16 : 0);
 for (i = -132; i < 256+132; i++)
     ((uint32_t *)table_g)[i] = table_Y[i+384] << 8;
 for (i = -232; i < 256+232; i++)
     ((uint32_t *)table_b)[i] = table_Y[i+384] << (isRgb ? 0 : 16);
 break;

    case 24:
 table_start= table_8 = av_malloc ((256 + 2*232) * sizeof (uint8_t));

 entry_size = sizeof (uint8_t);
 table_r = table_g = table_b = table_8 + 232;

 for (i = -232; i < 256+232; i++)
     ((uint8_t * )table_b)[i] = table_Y[i+384];
 break;

    case 15:
    case 16:
 table_start= table_16 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint16_t));

 entry_size = sizeof (uint16_t);
 table_r = table_16 + 197;
 table_b = table_16 + 197 + 685;
 table_g = table_16 + 197 + 2*682;

 for (i = -197; i < 256+197; i++) {
     int j = table_Y[i+384] >> 3;

     if (isRgb)
  j <<= ((bpp==16) ? 11 : 10);

     ((uint16_t *)table_r)[i] = j;
 }
 for (i = -132; i < 256+132; i++) {
     int j = table_Y[i+384] >> ((bpp==16) ? 2 : 3);

     ((uint16_t *)table_g)[i] = j << 5;
 }
 for (i = -232; i < 256+232; i++) {
     int j = table_Y[i+384] >> 3;

     if (!isRgb)
  j <<= ((bpp==16) ? 11 : 10);

     ((uint16_t *)table_b)[i] = j;
 }
 break;

    case 8:
 table_start= table_332 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint8_t));

 entry_size = sizeof (uint8_t);
 table_r = table_332 + 197;
 table_b = table_332 + 197 + 685;
 table_g = table_332 + 197 + 2*682;

 for (i = -197; i < 256+197; i++) {
     int j = (table_Y[i+384 - 16] + 18)/36;

     if (isRgb)
  j <<= 5;

     ((uint8_t *)table_r)[i] = j;
 }
 for (i = -132; i < 256+132; i++) {
     int j = (table_Y[i+384 - 16] + 18)/36;

     if (!isRgb)
  j <<= 1;

     ((uint8_t *)table_g)[i] = j << 2;
 }
 for (i = -232; i < 256+232; i++) {
     int j = (table_Y[i+384 - 37] + 43)/85;

     if (!isRgb)
  j <<= 6;

     ((uint8_t *)table_b)[i] = j;
 }
 break;
    case 4:
    case 4|128:
 table_start= table_121 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint8_t));

 entry_size = sizeof (uint8_t);
 table_r = table_121 + 197;
 table_b = table_121 + 197 + 685;
 table_g = table_121 + 197 + 2*682;

 for (i = -197; i < 256+197; i++) {
     int j = table_Y[i+384 - 110] >> 7;

     if (isRgb)
  j <<= 3;

     ((uint8_t *)table_r)[i] = j;
 }
 for (i = -132; i < 256+132; i++) {
     int j = (table_Y[i+384 - 37]+ 43)/85;

     ((uint8_t *)table_g)[i] = j << 1;
 }
 for (i = -232; i < 256+232; i++) {
     int j =table_Y[i+384 - 110] >> 7;

     if (!isRgb)
  j <<= 3;

     ((uint8_t *)table_b)[i] = j;
 }
 break;

    case 1:
 table_start= table_1 = av_malloc (256*2 * sizeof (uint8_t));

 entry_size = sizeof (uint8_t);
 table_g = table_1;
 table_r = table_b = ((void *)0);

 for (i = 0; i < 256+256; i++) {
     int j = table_Y[i + 384 - 110]>>7;

     ((uint8_t *)table_g)[i] = j;
 }
 break;

    default:
 table_start= ((void *)0);
 av_log(((void *)0), 0,"%ibpp not supported by yuv2rgb\n", bpp );

 return -1;
    }

    for (i = 0; i < 256; i++) {
 c->table_rV[i] = table_r + entry_size * div_round (crv * (i-128), 76309);
 c->table_gU[i] = table_g + entry_size * div_round (cgu * (i-128), 76309);
 c->table_gV[i] = entry_size * div_round (cgv * (i-128), 76309);
 c->table_bU[i] = table_b + entry_size * div_round (cbu * (i-128), 76309);
    }

    av_free(c->yuvTable);
    c->yuvTable= table_start;
    return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]