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

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

?? em85xxosd.c

?? mini gui 1.6.8 lib and source
?? C
字號:
/***  $Id: em85xxosd.c,v 1.9 2005/05/18 11:00:21 weiym Exp $****  em85xxosd.c: NEWGAL driver for EM85xx OSD.**  **  Copyright (C) 2003 Feynman Software.*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/types.h>#include <sys/file.h>#include <sys/stat.h>#include <fcntl.h>#include <signal.h>#include <sched.h>#include "common.h"#include "newgal.h"#include "sysvideo.h"#include "pixels_c.h"#include "realmagichwl_userland/caribbean_plainc.h"#include "realmagichwl_kernelland/realmagichwl.h"#include "realmagichwl_userland/realmagichwl_userland_api.h"#include "realmagichwl_kernelland/include/rm84cmn.h"#include "em85xxosd.h"#define EM85XXOSDVID_DRIVER_NAME "em85xxosd"/* Initialization/Query functions */static int EM85XXOSD_VideoInit(_THIS, GAL_PixelFormat *vformat);static GAL_Rect **EM85XXOSD_ListModes(_THIS, GAL_PixelFormat *format, Uint32 flags);static GAL_Surface *EM85XXOSD_SetVideoMode(_THIS, GAL_Surface *current, int width, int height, int bpp, Uint32 flags);static int EM85XXOSD_SetColors(_THIS, int first, int count, GAL_Color *palette);static void EM85XXOSD_VideoQuit(_THIS);/* Hardware surface functions */static int EM85XXOSD_AllocHWSurface(_THIS, GAL_Surface *surface);static void EM85XXOSD_FreeHWSurface(_THIS, GAL_Surface *surface);static void EM85XXOSD_UpdateRects (_THIS, int numrects, GAL_Rect *rects);/* EM85XXOSD driver bootstrap functions */static int EM85XXOSD_Available(void){    return(1);}static char stack_updater [512];static int task_do_update (void* data){    _THIS;    this = data;    while (this->hidden->status == 2) {        usleep (50000);    // 50 ms        if (this->hidden->dirty) {            asm ("mcr p15, 0, r0, c7, c10, 0\n");            RUA_OSDFB_REFRESH (this->hidden->handle, 0);   // manually refresh now            this->hidden->dirty = FALSE;        }    }    return 0;}static void EM85XXOSD_DeleteDevice(GAL_VideoDevice *device){    free(device->hidden);    free(device);}static GAL_VideoDevice *EM85XXOSD_CreateDevice(int devindex){    GAL_VideoDevice *device;    /* Initialize all variables that we clean on shutdown */    device = (GAL_VideoDevice *)malloc(sizeof(GAL_VideoDevice));    if ( device ) {        memset(device, 0, (sizeof *device));        device->hidden = (struct GAL_PrivateVideoData *)                malloc((sizeof *device->hidden));    }    if ( (device == NULL) || (device->hidden == NULL) ) {        GAL_OutOfMemory();        if ( device ) {            free(device);        }        return(0);    }    memset(device->hidden, 0, (sizeof *device->hidden));    /* Set the function pointers */    device->VideoInit = EM85XXOSD_VideoInit;    device->ListModes = EM85XXOSD_ListModes;    device->SetVideoMode = EM85XXOSD_SetVideoMode;    device->CreateYUVOverlay = NULL;    device->SetColors = EM85XXOSD_SetColors;    device->VideoQuit = EM85XXOSD_VideoQuit;#ifdef _LITE_VERSION    device->RequestHWSurface = NULL;#endif    device->AllocHWSurface = EM85XXOSD_AllocHWSurface;    device->CheckHWBlit = NULL;    device->FillHWRect = NULL;    device->SetHWColorKey = NULL;    device->SetHWAlpha = NULL;    device->FreeHWSurface = EM85XXOSD_FreeHWSurface;    device->UpdateRects = EM85XXOSD_UpdateRects;    device->free = EM85XXOSD_DeleteDevice;    return device;}VideoBootStrap EM85XXOSD_bootstrap = {    EM85XXOSDVID_DRIVER_NAME, "EM85xx OSD video driver",    EM85XXOSD_Available, EM85XXOSD_CreateDevice};static int EM85XXOSD_VideoInit(_THIS, GAL_PixelFormat *vformat){    unsigned long flicker;    RUA_handle h;    OSDBuffer osdbuffer;	Wnd_type Wnd;	evOutputDevice_type OutputDevice;	evTvStandard_type TvStandard;	evTvOutputFormat_type TvOutputFormat;    fprintf (stderr, "NEWGAL EM85xxOSD WARNING: You are using the EM85xx OSD video driver!\n");    if ((h = RUA_OpenDevice (0)) == -1) {        fprintf (stderr, "NEWGAL EM85xxOSD engine: Fatal error: can't open kernel module\n");        return -1;    }    /* set the tv output to be ntsc */	Wnd.x = 0;	Wnd.y = 0;	Wnd.w = 720;	Wnd.h = 480;	TvStandard = evTvStandard_NTSC;	TvOutputFormat = evTvOutputFormat_COMPOSITE;	OutputDevice = evOutputDevice_TV;	RUA_DECODER_SET_PROPERTY (h, VIDEO_SET, evTvOutputFormat, sizeof(TvOutputFormat), &TvOutputFormat);	RUA_DECODER_SET_PROPERTY (h, VIDEO_SET, evTvStandard, sizeof(TvStandard), &TvStandard);	RUA_DECODER_SET_PROPERTY (h, VIDEO_SET, evOutputDevice, sizeof(OutputDevice), &OutputDevice);	RUA_DECODER_SET_PROPERTY (h, VIDEO_SET, evDestinationWindow, sizeof(Wnd), &Wnd);    /* XXX If we need to we can mmap the osdbuf from the device */    this->hidden->handle = h;    if (RUA_OSDFB_REFRESH (this->hidden->handle, &osdbuffer) != 0) {        fprintf (stderr, "NEWGAL EM85xxOSD engine: Error getting the OSD buffer.\n");        goto fail;    } else {        this->hidden->osd_buffer = osdbuffer.framebuffer;        this->hidden->w = osdbuffer.width;        this->hidden->h = osdbuffer.height;        this->hidden->pitch = osdbuffer.width;        this->hidden->fb = osdbuffer.framebuffer + 8 + 1024;    }        if (osdbuffer.bpp != 8) {        GAL_SetError ("NEWGAL EM85xxOSD engine: Not supported depth: %d.\n", vformat->BitsPerPixel);        return -1;    }    /* Setup the flicker filter     * XXX - its also set in the kernel module, but it seems not to work very well     *  We reset it here, so that the microcode as already seen an osd frame.         * 0 <= flicker <= 15     */    flicker = 15;    RUA_DECODER_SET_PROPERTY (this->hidden->handle, DECODER_SET, edecOsdFlicker, sizeof(flicker), &flicker);    /*      * set the osd window destination     * do not scale - just center the image     */    Wnd.x = (720 - osdbuffer.width) / 2;    Wnd.y = (480 - osdbuffer.height) / 2;    Wnd.w = osdbuffer.width;    Wnd.h = osdbuffer.height;    RUA_DECODER_SET_PROPERTY (h, OSD_SET, eOsdDestinationWindow, sizeof(Wnd), &Wnd);    vformat->BitsPerPixel = 8;    vformat->BytesPerPixel = 1;    vformat->Rmask = 0xE0;    vformat->Gmask = 0x1C;    vformat->Bmask = 0x03;    this->hidden->status = 2;    this->hidden->dirty = FALSE;    /* We're done! */    return(0);fail:    return -1;}static GAL_Rect **EM85XXOSD_ListModes(_THIS, GAL_PixelFormat *format, Uint32 flags){    return (GAL_Rect **) -1;}static GAL_Surface *EM85XXOSD_SetVideoMode(_THIS, GAL_Surface *current,                int width, int height, int bpp, Uint32 flags){    /* Set up the new mode framebuffer */    current->flags = GAL_HWSURFACE | GAL_FULLSCREEN | GAL_HWPALETTE;    current->w = this->hidden->w;    current->h = this->hidden->h;    current->pitch = this->hidden->pitch;    current->pixels = this->hidden->fb;    if (!GAL_ReallocFormat (current, 8, 0, 0, 0, 0) ) {        return (NULL);    }    clone (task_do_update, stack_updater + 512, CLONE_VM | CLONE_FS | CLONE_FILES, this);    /* We're done */    return (current);}/* We don't actually allow hardware surfaces other than the main one */static int EM85XXOSD_AllocHWSurface(_THIS, GAL_Surface *surface){    return(-1);}static void EM85XXOSD_FreeHWSurface(_THIS, GAL_Surface *surface){    surface->pixels = NULL;}#define START       0#define END         65536#define PRECISION   20/* This trick transform [0..255] range into [0..65535] range (instead of about 0..255*256) */#define RANGE8TO16(x) (((x)<<8)|(x))// see video demystified page 43static void gammacorrectedrgbtoyuv (Uint16 R, Uint16 G, Uint16 B, Uint16 *y, Uint16 *u, Uint16 *v){    long yraw, uraw, vraw;        yraw = ( 257*R  +504*G + 98*B)/1000 + RANGE8TO16(16);    uraw = (-148*R  -291*G +439*B)/1000 + RANGE8TO16(128);    vraw = ( 439*R  -368*G - 71*B)/1000 + RANGE8TO16(128);    /* Obviously the computation of yraw garantees >= RANGE8TO16(16) ;-)       This is also true for uraw and vraw */        *y = MAX(MIN(yraw,RANGE8TO16(235)),RANGE8TO16(16));     *u = MAX(MIN(uraw,RANGE8TO16(240)),RANGE8TO16(16));    *v = MAX(MIN(vraw,RANGE8TO16(240)),RANGE8TO16(16));}static int EM85XXOSD_SetColors(_THIS, int first, int count, GAL_Color *palette){    int         i;    Uint8*      pal = this->hidden->osd_buffer + 8;    GAL_Color*  p;    /* convert palette to quasar format*/    pal += first * 4;    p = palette;    for (i = first; i < (first + count); i++) {        Uint16 Y, U, V;        Uint16 R, G, B;        /* RGB->YUVe computation. */        R = RANGE8TO16 (p->r);        G = RANGE8TO16 (p->g);        B = RANGE8TO16 (p->b);        gammacorrectedrgbtoyuv (R, G, B, &Y, &U, &V);        /* hardcode alpha blending values */        if (i == 0)            pal[0] = 0x00;        else if (i == 6)            pal[0] = 0x66;        else if (i == 15)            pal[0] = 0x80;        else if (i == 242)            pal[0] = 0x80;        else            pal[0] = 0xff;        pal[1] = (Uint8)(Y >> 8);        pal[2] = (Uint8)(U >> 8);        pal[3] = (Uint8)(V >> 8);        pal += 4;        p ++;    }    return 0;}static void EM85XXOSD_UpdateRects (_THIS, int numrects, GAL_Rect *rects){    this->hidden->dirty = TRUE;}static void EM85XXOSD_VideoQuit(_THIS){    if (this->hidden->status != 2)        return;    this->hidden->status = 1;    RUA_ReleaseDevice (this->hidden->handle);    return;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区成人在线视频 | 99视频一区二区| 亚洲黄色录像片| 亚洲国产欧美日韩另类综合 | 国产精品九色蝌蚪自拍| 中文字幕中文字幕中文字幕亚洲无线 | 欧美二区三区的天堂| 国内久久精品视频| 99re亚洲国产精品| 久久影音资源网| 91国产视频在线观看| 风间由美中文字幕在线看视频国产欧美 | 国产综合一区二区| 欧美日韩国产在线播放网站| 久久久久国色av免费看影院| 亚洲国产精品精华液网站| 国产九九视频一区二区三区| 欧美日韩一区在线| 中文字幕欧美激情一区| 日韩精彩视频在线观看| 99这里都是精品| 欧美日韩国产一区二区三区地区| 亚洲国产电影在线观看| 美腿丝袜亚洲综合| 欧美在线视频不卡| 中文久久乱码一区二区| 免费的成人av| 在线观看日韩一区| 国产精品女人毛片| 国模无码大尺度一区二区三区| 91丨九色丨黑人外教| 久久久.com| 免费成人在线播放| 在线亚洲一区二区| 欧美videos中文字幕| 亚洲五月六月丁香激情| 94-欧美-setu| 国产精品成人免费在线| 国产在线一区观看| 91精品在线麻豆| 亚洲激情六月丁香| 不卡视频在线观看| 久久精品一区二区| 国内外精品视频| 久久久噜噜噜久久中文字幕色伊伊 | 欧美福利一区二区| 亚洲成av人片一区二区梦乃| 欧美日韩一区精品| 日韩电影在线免费| 日韩欧美国产高清| 国产精品自拍av| 欧美高清在线一区| 国产精品久久久久久福利一牛影视| 亚洲精品欧美综合四区| 91美女片黄在线| 亚洲男人的天堂在线观看| 一本久道久久综合中文字幕| 亚洲午夜影视影院在线观看| 欧美午夜精品理论片a级按摩| 午夜久久久影院| 日韩一区二区在线看片| 久久99精品久久久久久动态图| 2020国产精品自拍| 岛国av在线一区| 亚洲欧美综合网| 在线观看av不卡| 蜜臀av一区二区| 久久综合久色欧美综合狠狠| 国产成a人无v码亚洲福利| 中文字幕日本不卡| 欧美三区在线视频| 久久精品国产亚洲一区二区三区 | 成人丝袜18视频在线观看| 亚洲精品成a人| 6080亚洲精品一区二区| 国产一区二区三区电影在线观看| 国产精品二三区| 欧美美女喷水视频| 国产精品一区在线| 亚洲精品成人少妇| 日韩精品在线网站| 不卡区在线中文字幕| 亚洲国产精品嫩草影院| 精品久久久三级丝袜| 91在线国内视频| 男女男精品视频| 中文字幕在线不卡视频| 欧美日本在线观看| 国产传媒久久文化传媒| 一区二区三区不卡视频| 精品国产乱码久久久久久1区2区| 91免费在线看| 精品无人码麻豆乱码1区2区| 亚洲精品美国一| 精品美女在线播放| 91电影在线观看| 极品少妇xxxx偷拍精品少妇| 亚洲激情一二三区| 久久久久久97三级| 欧美区一区二区三区| 粉嫩aⅴ一区二区三区四区| 日韩在线一区二区三区| 国产精品成人免费| 精品日韩一区二区三区| 欧美综合一区二区三区| 国产精品正在播放| 日本一区中文字幕| 亚洲三级在线观看| 久久久久久久久伊人| 欧美猛男男办公室激情| www.日韩av| 黑人巨大精品欧美黑白配亚洲| 一区2区3区在线看| 日本一区二区久久| 日韩三级中文字幕| 91成人国产精品| 成人国产精品免费观看视频| 久久99国产精品麻豆| 亚洲国产综合在线| 亚洲日穴在线视频| 国产性天天综合网| 日韩精品一区二区在线| 欧美亚洲愉拍一区二区| av一二三不卡影片| 国产剧情一区二区三区| 日本特黄久久久高潮| 亚洲一区二区三区四区在线| 中文字幕av免费专区久久| 精品国精品国产尤物美女| 69成人精品免费视频| 在线观看av一区| 91丝袜美腿高跟国产极品老师 | 亚洲国产日韩一级| 亚洲日本青草视频在线怡红院| 国产亚洲一区二区三区四区| 日韩视频123| 欧美一区二区日韩| 欧美午夜影院一区| 色老综合老女人久久久| 99久久99久久久精品齐齐| 成人综合日日夜夜| 国产91在线观看| 国产伦精品一区二区三区视频青涩 | 精品日产卡一卡二卡麻豆| 555夜色666亚洲国产免| 欧美三区免费完整视频在线观看| 91丨porny丨最新| youjizz久久| 99精品桃花视频在线观看| fc2成人免费人成在线观看播放 | 免费av网站大全久久| 亚洲成av人影院在线观看网| 一区二区高清视频在线观看| 一区二区成人在线观看| 亚洲自拍与偷拍| 亚洲午夜久久久久久久久久久| 亚洲视频1区2区| 亚洲精品国产无套在线观| 亚洲天堂免费在线观看视频| 亚洲欧美另类久久久精品2019| 中文字幕不卡的av| 亚洲视频综合在线| 亚洲欧美日韩一区二区| 亚洲三级免费电影| 亚洲一区av在线| 性久久久久久久久久久久| 日韩精品三区四区| 另类小说一区二区三区| 国产一区欧美一区| 成人国产亚洲欧美成人综合网| 99视频精品在线| 91福利视频久久久久| 欧美日韩精品电影| 欧美tk丨vk视频| 欧美激情中文字幕| 亚洲欧美一区二区三区极速播放 | 一区二区三区在线视频播放| 亚洲一区中文日韩| 日本亚洲电影天堂| 久久福利资源站| 国产精品一二三四五| 91网站黄www| 欧美电影一区二区三区| 欧美一区二区三区的| 久久蜜桃av一区二区天堂| 亚洲欧洲日韩一区二区三区| 亚洲国产精品天堂| 九色综合狠狠综合久久| 成人午夜私人影院| 欧洲生活片亚洲生活在线观看| 欧美高清视频在线高清观看mv色露露十八| 91精品国产欧美一区二区| 久久婷婷国产综合国色天香| 亚洲欧美怡红院| 婷婷久久综合九色综合绿巨人| 久久国产福利国产秒拍| 成人精品一区二区三区中文字幕 | 成人在线视频一区| 91成人免费在线| 精品日韩在线一区|