亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? display.cc

?? ac3的解碼程序
?? CC
?? 第 1 頁 / 共 4 頁
字號:
/*   File: display.cc   By: Alex de Jong (original by MSSG)   Created: March 1996      Description:   Multi-Threaded display class. Displays class is able to    synchronize frames with a synchronoization object, which   in turn is updates by a decoder timer.*/#ifdef __GNUG__#pragma implementation#endif#include "athread.hh"#include <stdio.h>#include <fstream.h>#include <sys/time.h>#include "error.hh"#include "debug.hh"#include "util.hh"#include "videoconst.hh"#include "sync.hh"#include "display.hh"extern int quiet;extern int coded_picture_width;extern int coded_picture_height;extern int prog_seq;extern int chroma_format;extern int chrom_width;extern int pict_struct, topfirst;extern int convmat[8][4];extern int matrix_coefficients;extern int playedlastframe;// #define USE_DGA 1               /* enable this to use DGA extention */#ifdef SH_MEM// Dummies to get rid of warningsextern "C" {int XShmQueryExtension(Display*);int XShmGetEventBase(Display*);}#ifdef USE_DGA#include <X11/extensions/xf86dga.h>#include <X11/extensions/xf86vmode.h>#endif#endif#ifdef SOLARIS_SDK_XILXil_boolean error_handler(XilError error){  xil_call_next_error_handler(error);  error("XIL received an error: exiting!");  exit(1);  return True;}#endif // SOLARIS_SDK_XILDisplayX11::DisplayX11(const char* title, Synchronization* s){  TRACER("DisplayX11::DisplayX11(const char* title, Synchronization* s)");  int crv, cbu, cgu, cgv;  int y, u, v, r, g, b;  int i, j;  Colormap cmap;  XColor xcolor;  unsigned int fg, bg;  XSizeHints hint;  unsigned long tmp_pixel;  XWindowAttributes xwa;  int screen;    // init to avoid invalid destroy in destructor  ximage=0;  ximage2=0;  // Synchronization with decoder clock  sync=s;  // Init display lock/condition to prevent threads to pass eachother  source=0;#ifdef SOLARIS_SDK_XIL  resized=0;  // window has not been resized  horizontal_size=100;  vertical_size=100;  horizontal_factor=1.0;  vertical_factor=1.0;#else#ifdef SH_MEM  CompletionType = -1;#endif#endif  // create clipping table  clp=new unsigned char[1024];  // clip table  clp += 384;  for (i=-384; i<640; i++)     clp[i] = (i<0) ? 0 : ((i>255) ? 255 : i);  if (!(display=XOpenDisplay(0))){    error("Can not open display\n");    athr_exit(0);  }#ifdef TRACE  XSynchronize(display, 1);#endif      screen = DefaultScreen(display);  // find best display  if (XMatchVisualInfo(display, screen, 24, TrueColor, &vinfo)){  } else#if (defined(LINUX)&&defined(MMX))  if (XMatchVisualInfo(display, screen, 16, TrueColor, &vinfo)){  } else#endif  if (XMatchVisualInfo(display, screen, 8, PseudoColor, &vinfo)){  }  else if (XMatchVisualInfo(display, screen, 8, GrayScale, &vinfo)){  }  else if (XMatchVisualInfo(display, screen, 8, StaticGray, &vinfo)){  }  else if (XMatchVisualInfo(display, screen, 1, StaticGray, &vinfo)) {  }#ifdef LINUX  else error("requires 16 bit display\n");#else  else error("requires 8 bit or 24 bit display\n");#endif  // Make the window  hint.x = 200;  hint.y = 200;  hint.width = 100;  hint.height= 100;  hint.flags = PPosition | PSize;  bpp = vinfo.depth;  if (vinfo.red_mask == 0x7c00)    rgb_mode = 1;		// RGB555    for more modes see yuv12-rgb.s  else    rgb_mode = 0;		// RGB565  if (vinfo.c_class==TrueColor && bpp == 24 ){#ifdef SOLARIS_SDK_XIL    bands=3;#endif    cmap=XCreateColormap(display, DefaultRootWindow(display), vinfo.visual, AllocNone);        XSetWindowAttributes xswa;    xswa.colormap = cmap;    xswa.event_mask = StructureNotifyMask;    xswa.border_pixel = BlackPixel(display, screen);        window=XCreateWindow(display, DefaultRootWindow(display),                           hint.x, hint.y, hint.width, hint.height,                           0,                           vinfo.depth, InputOutput, vinfo.visual,                           CWBorderPixel | CWColormap | CWEventMask, &xswa);  }  else {#ifdef SOLARIS_SDK_XIL     bands=1;#endif    // Get some colors    bg = WhitePixel(display, screen);    fg = BlackPixel(display, screen);    window=XCreateSimpleWindow(display, DefaultRootWindow (display),                               hint.x, hint.y, hint.width, hint.height, 4, fg, bg);  }  // Tell other applications about this window  XSetStandardProperties(display, window, title, title, None, NULL, 0, &hint);  XSelectInput(display, window, StructureNotifyMask);  // Map window  XMapWindow(display, window);  // Wait for map.  do {    XNextEvent(display, &event);  }  while (event.type != MapNotify || event.xmap.event != window);  XSelectInput(display, window, NoEventMask);  if (vinfo.c_class==PseudoColor){     // Do dithering before display    int privte=0;        // allocate colors    gc = DefaultGC(display, screen);    cmap = DefaultColormap(display, screen);    // matrix coefficients    crv = convmat[matrix_coefficients][0];    cbu = convmat[matrix_coefficients][1];    cgu = convmat[matrix_coefficients][2];    cgv = convmat[matrix_coefficients][3];        /* color allocation:     * i is the (internal) 8 bit color number, it consists of separate     * bit fields for Y, U and V: i = (yyyyuuvv), we don't use yyyy=0000     * yyyy=0001 and yyyy=1111, this leaves 48 colors for other applications     *     * the allocated colors correspond to the following Y, U and V values:     * Y:   40, 56, 72, 88, 104, 120, 136, 152, 168, 184, 200, 216, 232     * U,V: -48, -16, 16, 48     *     * U and V values span only about half the color space; this gives     * usually much better quality, although highly saturated colors can     * not be displayed properly     *     * translation to R,G,B is implicitly done by the color look-up table     */    // THIS IS REALLY SLOW on a 24 Bit display. Please drop me a line if    // you know how to do this faster (alex.dejong@nist.gov)    // DON'T ALLOCATE 240 COLORS!! Just 215 will do and stops Solaris    // from colors blinking when moving the cursor#if (defined(SOLARIS))    int number_of_colors=215;#endif#if (defined(IRIX)|| defined(LINUX))    int number_of_colors=240;#endif    for (i=32; i<number_of_colors; i++){      /* color space conversion */      y = 16*((i>>4)&15) + 8;      u = 32*((i>>2)&3)  - 48;      v = 32*(i&3)       - 48;            y = 76309 * (y - 16); /* (255/219)*65536 */            r = clp[(y + crv*v + 32768)>>16];      g = clp[(y - cgu*u -cgv*v + 32768)>>16];      b = clp[(y + cbu*u + 32786)>>16];            /* X11 colors are 16 bit */      xcolor.red   = r << 8;      xcolor.green = g << 8;      xcolor.blue  = b << 8;            if (XAllocColor(display, cmap, &xcolor) != 0) pixel[i] = xcolor.pixel;      else {        /* allocation failed, have to use a private colormap */                if (privte) error("Couldn't allocate private colormap");                privte = 1;                if (!quiet)          fprintf(stderr, "Using private colormap (%d colors were available)\n",                  i-32);                /* Free colors. */        while (--i >= 32){          tmp_pixel = pixel[i]; /* because XFreeColors expects unsigned long */          XFreeColors(display, cmap, &tmp_pixel, 1, 0);        }         /* i is now 31, this restarts the outer loop */                /* create private colormap */                XGetWindowAttributes(display, window, &xwa);        cmap = XCreateColormap(display, window, xwa.visual, AllocNone);        XSetWindowColormap(display, window, cmap);      }    }  }  else    gc = DefaultGC(display, screen);/*   Init dither   4x4 ordered dither   threshold pattern:    0  8  2 10   12  4 14  6    3 11  1  9   15  7 13  5*/  unsigned char ctab[256+32];    for (i=0; i<256+16; i++){    v = (i-8)>>4;    if (v<2) v=2;    else if (v>14) v=14;    for (j=0; j<16; j++)       ytab[16*i+j] = pixel[(v<<4)+j];  }  for (i=0; i<256+32; i++){    v = (i+48-128)>>5;    if (v<0) v=0;    else if (v>3) v=3;    ctab[i]=v;  }  for (i=0; i<255+15; i++)    for (j=0; j<255+15; j++)      uvtab[256*i+j]=(ctab[i+16]<<6)|(ctab[j+16]<<4)|(ctab[i]<<2)|ctab[j];}DisplayX11::~DisplayX11(){   TRACER("DisplayX11::~DisplayX11()");  display_lock.lock();  if (!terminated) athr_join(thread_id);  exit_display();  delete clp; // delete clipping table  display_lock.unlock();}void* DisplayX11::dither_thread(DisplayX11* d){  d->display_lock.lock();  d->terminated=0;  d->dither_image(d->source);  d->display_image(d->ximage, d->dithered_image);   d->source=0;  d->display_cond.signal();  d->terminated=1;  d->display_lock.unlock(); #if !defined(IRIX) && !defined(SOLARIS_SDK_XIL) && !defined(LINUX)  athr_exit(0);#endif  return 0;}void* DisplayX11::display_thread(DisplayX11* d){#ifndef LINUX  d->display_lock.lock();  d->terminated=0;  d->display_image(d->ximage2, d->dithered_image2);   d->terminated=1;  d->display_lock.unlock();#if !defined(IRIX) && !defined(SOLARIS_SDK_XIL) && !defined(LINUX)  athr_exit(0);#endif#endif  return 0;}int DisplayX11::init(int h_size, int v_size){  TRACER("void DisplayX11::init(int h_size, int v_size)");  display_lock.lock();  // lock the display from others access for now  // resize window  horizontal_size=h_size;  vertical_size=v_size;  XResizeWindow(display, window, horizontal_size, vertical_size);#ifdef SOLARIS_SDK_XIL  if ((State = xil_open()) == NULL)    exit(1);   // XIL sends an error message to stderr if xil_open fails   // Install error handler  if (xil_install_error_handler(State, error_handler) == XIL_FAILURE)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美偷拍三级| 国产精品丝袜久久久久久app| 国产又黄又大久久| 免费三级欧美电影| 国产精品久久午夜夜伦鲁鲁| 欧美性视频一区二区三区| 国产精品亚洲第一| 日韩av在线播放中文字幕| 一区二区三区久久| 国产精品美女久久久久久久| 91精品久久久久久久99蜜桃| 色网站国产精品| 成人午夜av影视| 国产乱码字幕精品高清av | 国产在线不卡一区| 日韩激情在线观看| 亚洲一区成人在线| 亚洲视频精选在线| 国产精品久久久久久久久果冻传媒| 这里只有精品视频在线观看| 色香蕉成人二区免费| 成人综合婷婷国产精品久久 | 97久久精品人人做人人爽| 韩国毛片一区二区三区| 五月开心婷婷久久| 亚洲一区二区三区爽爽爽爽爽| 中文成人综合网| 久久九九久久九九| 久久蜜桃一区二区| 久久久美女毛片| 久久人人97超碰com| 欧美大片在线观看一区二区| 欧美精品在线观看播放| 欧美丰满嫩嫩电影| 欧美色倩网站大全免费| 91精品福利在线| www.日本不卡| 成人av网站在线观看免费| 国产不卡视频在线观看| 成人激情文学综合网| 成人免费毛片高清视频| 不卡一区二区三区四区| 成人av免费在线| 91看片淫黄大片一级在线观看| 国产精品系列在线观看| 成人一区二区三区视频在线观看 | 久久精品国产精品青草| 看片网站欧美日韩| 国产精品一区专区| 成人h精品动漫一区二区三区| av一区二区三区在线| 色噜噜狠狠色综合欧洲selulu | 欧美成人猛片aaaaaaa| 亚洲精品一区二区三区四区高清 | 成人黄色av电影| 99久久伊人精品| 欧美日韩激情一区二区| 日韩欧美久久一区| 久久精品夜色噜噜亚洲a∨| 国产精品入口麻豆原神| 亚洲视频小说图片| 香蕉久久夜色精品国产使用方法| 日本视频一区二区三区| 国产一区二区精品久久91| 成人高清免费在线播放| 欧美亚洲综合在线| 欧美videos中文字幕| 国产欧美视频一区二区三区| 亚洲欧洲无码一区二区三区| 一区二区三区在线观看国产| 热久久国产精品| 国产精品99久久久久| 99久久伊人精品| 在线电影欧美成精品| ww亚洲ww在线观看国产| 亚洲日穴在线视频| 日韩成人午夜精品| 国产成人综合自拍| 欧美日韩电影在线播放| 国产三级一区二区三区| 亚洲一二三四在线观看| 激情小说欧美图片| 色先锋久久av资源部| 精品免费视频.| 亚洲综合一区二区精品导航| 久久激情五月婷婷| 91成人网在线| 久久精品人人做人人爽人人| 一片黄亚洲嫩模| 国产精品888| 欧美精品视频www在线观看| 欧美经典三级视频一区二区三区| 亚洲国产精品久久艾草纯爱| 国产v日产∨综合v精品视频| 欧美精品第1页| 亚洲欧美日韩久久| 国产精品一区二区三区99| 欧美日韩一区二区三区高清| 中文字幕巨乱亚洲| 激情文学综合丁香| 91精品国产美女浴室洗澡无遮挡| 26uuu另类欧美亚洲曰本| 亚洲国产欧美另类丝袜| av中文字幕一区| 精品国产一区二区三区久久久蜜月| 亚洲人xxxx| 国产风韵犹存在线视精品| 3d动漫精品啪啪1区2区免费| 亚洲男人都懂的| 丁香激情综合国产| 亚洲精品一区二区三区蜜桃下载| 午夜欧美大尺度福利影院在线看| 成人的网站免费观看| 久久综合久久久久88| 人妖欧美一区二区| 欧美日韩国产综合一区二区| 亚洲欧美福利一区二区| 成人黄色a**站在线观看| 国产亚洲精久久久久久| 热久久久久久久| 欧美一区午夜视频在线观看| 亚洲综合区在线| 日本韩国精品一区二区在线观看| 日本一二三不卡| 国产91在线观看丝袜| 久久婷婷久久一区二区三区| 毛片一区二区三区| 欧美一区日本一区韩国一区| 亚洲va国产天堂va久久en| 在线精品视频一区二区| 国产精品久久久久国产精品日日 | 91.com视频| 日韩毛片视频在线看| 国产成人综合视频| 久久久久久夜精品精品免费| 精品亚洲porn| 久久―日本道色综合久久| 国产在线日韩欧美| 国产日韩欧美综合一区| 国产夫妻精品视频| 国产精品免费久久| 99在线精品观看| 一区二区三区在线免费观看| 欧美亚洲丝袜传媒另类| 天使萌一区二区三区免费观看| 欧美日韩亚洲综合一区| 视频一区二区不卡| 欧美一区二区三区在线观看| 麻豆精品一区二区av白丝在线| 欧美刺激午夜性久久久久久久 | 精品在线免费观看| 久久久久久久久久久久久久久99| 国产乱码精品一区二区三区五月婷| 久久久精品欧美丰满| 成人禁用看黄a在线| 一区二区三区在线播放| 制服丝袜日韩国产| 国产美女娇喘av呻吟久久| 中文字幕欧美激情| 欧洲色大大久久| 欧美aaaaaa午夜精品| 久久精品亚洲乱码伦伦中文 | 粉嫩一区二区三区性色av| 亚洲丝袜另类动漫二区| 欧美图片一区二区三区| 欧美a一区二区| 国产精品久久久久久久久果冻传媒| 日本韩国欧美三级| 精品中文字幕一区二区小辣椒| 国产精品女主播在线观看| 在线精品亚洲一区二区不卡| 久久精品噜噜噜成人av农村| 欧美国产国产综合| 欧美精品在线一区二区| 国产成人一级电影| 亚洲国产视频在线| 久久婷婷成人综合色| 色综合久久中文字幕| 美腿丝袜亚洲色图| 亚洲欧美日韩久久| 精品国产伦一区二区三区免费| 99精品国产99久久久久久白柏| 三级亚洲高清视频| 亚洲欧洲国产日韩| 日韩女优av电影在线观看| 色综合中文综合网| 伦理电影国产精品| 欧美激情在线看| aaa欧美大片| 欧美中文字幕亚洲一区二区va在线 | 亚洲v日本v欧美v久久精品| 亚洲日本青草视频在线怡红院| 美女一区二区视频| 国产成a人亚洲精品| 99r精品视频| 欧美一区二区三区视频免费 | 亚洲综合视频网| 久久午夜羞羞影院免费观看| 欧美亚洲动漫制服丝袜| 成人综合婷婷国产精品久久免费|