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

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

?? tmsei.c

?? 可用于TM1300/PNX1300系列DSP(主要用于視頻處理)壓縮庫即應用例子。
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*
 *  +-------------------------------------------------------------------+
 *  | Copyright (c) 1995,2000 TriMedia Technologies Inc.                |
 *  |                                                                   |
 *  | This software  is furnished under a license  and may only be used |
 *  | and copied in accordance with the terms  and conditions of such a |
 *  | license  and with  the inclusion of this  copyright notice.  This |
 *  | software or any other copies of this software may not be provided |
 *  | or otherwise  made available  to any other person.  The ownership |
 *  | and title of this software is not transferred.                    |
 *  |                                                                   |
 *  | The information  in this software  is subject  to change  without |
 *  | any  prior notice  and should not be construed as a commitment by |
 *  | TriMedia Technologies.                                            |
 *  |                                                                   |
 *  | This  code  and  information  is  provided  "as is"  without  any |
 *  | warranty of any kind,  either expressed or implied, including but |
 *  | not limited  to the implied warranties  of merchantability and/or |
 *  | fitness for any particular purpose.                               |
 *  +-------------------------------------------------------------------+
 *
 *  Module name              : tmSEI.c    1.25
 *
 *  Module type              : IMPLEMENTATION
 *
 *  Title                    : Self Extracting Image
 *
 *  Last update              : 16:05:37 - 00/06/16
 *
 *  Description              : Usase zlib compression, Command line parser
 *                             and down loader    
 */
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

#ifndef _WIN32
#include <unistd.h>
#include <dirent.h>
#else
#include <windows.h>
#endif

#include <TMDownLoader.h>
#include <tmhost.h>

/* if using the hp build */
#ifdef hpux
/* undefine Long and uLongf */   
#undef uLong
#undef uLongf
#undef Byte
#endif

#include "tsaCmdOpt.h"
#include <zlib.h>

#include "tmSEI_options.h"
  
tsaCmdOptOption_t	options[] = {
#define	_Eg_opts_impl
#undef	Def
#define	Def(name,o1,o2,typ,flags,dflt,descr)	\
  o1,o2,typ,flags,(void *)(dflt),descr,Null,
#include "tmSEI_options.h"
};

#ifndef O_BINARY
#define O_BINARY 0 /* not defined on Unix */
#endif

#ifdef _WIN32
#define SLASH "\\"
#else
#define SLASH "/"
#endif

#define UNIX_PATH_NAME_SEPARATOR '/'
#define WIN_PATH_NAME_SEPARATOR  '\\'

#define MAX_FILENAME 1024
#define BLOCKSIZE    0x800
#define TEMP_DIR     ".tmSEI.temp"
#define TEMP_BASE    "tmpackedimage"

#define TCS_BIN      TCSString SLASH "bin" SLASH 

#define	Nelts(vec)	(sizeof(vec) / sizeof((vec)[0]))

static const char *progname = NULL;

static char *out_name_temp = NULL;
static char *out_namet =NULL;
static char *out_nameh =NULL;
static char *shrinkflags;

static char buffer[MAX_FILENAME];
static char tcspath_buffer[MAX_FILENAME];
static char sei_ldflags[MAX_FILENAME];

static int fo = 0;
static int ft = 0;
static int fh = 0;

static int mem_start = 0;
static int mem_end   = 0;

static int sei_start = 0;
static int sei_end   = 0;


static char buf[BLOCKSIZE];

static unsigned int NumElements = 0;

/* options arguements intialised as per data
   struct in tmSEI_options.h */
static Bool  NoCompression;
static Bool  inmi;
static Bool  out;
static char* host;
static int   tm_freq;
static int                       mmio_base;
static char                     *output;
static TMDwnLdr_CachingSupport   cache_support;
static char                     *bigendian;
static Bool                      unshuffled;
static Bool                      verbose;
static char                     *cflags;
static char                     *ldflags;
static char                     *tcspath;
static char                     *cpath;

static char  *image_file;
static int   host_int;
static Bool  download_unshuffled;

static int text_len;
static int locked_text_len;
static int locked_text_base;

/* used for siumlator Memory image */
static int  lv_syscall;

/* Prototypes for hidden supported functions. */
void TMDwnLdr_set_unshuffled( TMDwnLdr_Object_Handle  handle );
void TMDwnLdr_get_text_positions( TMDwnLdr_Object_Handle handle, 
                                  Int *text_len, Int *locked_text_len, Int *locked_text_base);

/*--------------------------- helper functions -------------------------*/

static int
parse_number( char *repr, char terminator, char **next, int *result )
{
     char *nxt;

    *result= strtol( repr, &nxt, 0 );

    if(*result < 0){
       return False;
    }

    if( *nxt != terminator){
        printf("Wrong Numeric Format\n");
        return False;
    }

    if (next) { *next= nxt; }

    return True;
}


static int
copy( char *old, char *new){

   int src, dest ;
    int lv_read,lv_write,lv_ret,file_size;
    void *inmem;
    struct stat statBuf;
    
    src = open(old, O_RDONLY|O_BINARY);
    if (src == -1) {
        printf("Failed to open %s with error code %d\n", old, errno);
        return False;
    }

    /* get size of source file */
    lv_ret = fstat(src,&statBuf);
    if(lv_ret == -1) {
       printf("Failed to stat %s with error code %d\n", old, errno);
       close(src);
       return False;
    }
    
   file_size = statBuf.st_size;

   /* inmem is input memory */
   inmem = (void *)malloc(file_size);

   /* buffer will be output memory */
   if (inmem == NULL)
   {
      printf("out of memory\n");
      free(inmem);close(src);
      return False;
   }
   
   /* read the source into buf */
   lv_read= read  (src,  inmem, file_size);
   if(lv_read != file_size)
   {
       printf("read failure\n");
      free(inmem);close(src);
      return False;
   }

   close(src);

   dest = open(new,O_CREAT|O_WRONLY|O_BINARY,0x1FF);
   if (dest == -1) {
      printf("Failed to create %s with error code %d\n", new, errno);
      free(inmem);
      return False;
   }

   lv_write = write(dest, inmem, file_size);
   if(lv_write != file_size)
   {
       printf("write failure\n");
      free(inmem);   close(dest);
      return False;
   }

   free(inmem);
   close(dest);

   /* ensure that the file is readable */
   chmod(new,0x1FF);

   return file_size;
}

void 
rewrite_slashes( char *cmd )
{
#if defined(_WIN32)
	int i, len = strlen(cmd);

	for ( i = 0; i < len; i++ ) {
		if ( cmd[i] == UNIX_PATH_NAME_SEPARATOR )
			cmd[i] = WIN_PATH_NAME_SEPARATOR;
	}
#endif
}

#if	defined(_WIN32)
/* Windows implementation of Posix.1 directory handling calls:
 *	opendir(), readdir(), rewinddir(), closedir()
 * and also the unrelated system calls
 *	fsync(), sync().
 * These are implemented directly as system calls on SunOS and HP-UX
 * but not on Windows,
 * so this is Windows-specific code, required only for Windows.
 */

/* Directory entry. */
struct	dirent
{
	long	d_ino;
	long	d_namlen;
	char	d_name[MAX_PATH];
};

/* Directory. */
typedef	struct
{
	struct dirent	dirent;
	int		Win32EntryCount;
	HANDLE		Win32DirectoryHandle;
	WIN32_FIND_DATA	Win32FindData;
	char		Win32DirectoryName[1];
} DIR;

/* Open a directory. */
DIR *
opendir(char const *dirname)
{
	DIR	*dir;

	dir = (DIR *)malloc(sizeof(*dir) + strlen(dirname) + 3);
	if (dir == NULL) {
		/* No memory for DIR structure. */
		errno = ENOMEM;
		return NULL;
	}
	dir->Win32EntryCount = 0;
	sprintf(dir->Win32DirectoryName, "%s\\*", dirname);
	dir->Win32DirectoryHandle = FindFirstFile(dir->Win32DirectoryName,
						  &dir->Win32FindData);
	if (dir->Win32DirectoryHandle == INVALID_HANDLE_VALUE) {
		/* Not found, free and return failure. */
		free(dir);
		errno = ENOENT;
		return NULL;
	}
	return dir;	/* success */
}

/* Read the next entry from a directory. */
struct dirent *
readdir(DIR * dir)
{
	if (dir->Win32EntryCount == 0) {
		FindClose(dir->Win32DirectoryHandle);
		dir->Win32DirectoryHandle = FindFirstFile(dir->Win32DirectoryName,
							  &dir->Win32FindData);
		if (dir->Win32DirectoryHandle == INVALID_HANDLE_VALUE) {
			errno = EINVAL;
			return NULL;
		}
	} else if ((FindNextFile(dir->Win32DirectoryHandle,
				 &dir->Win32FindData) == 0) 
		&& (GetLastError() == ERROR_NO_MORE_FILES)) {
			return NULL;
	}
	dir->Win32EntryCount++;
	dir->dirent.d_ino = dir->Win32EntryCount;	/* this field is unneeded */
	dir->dirent.d_namlen = strlen(dir->Win32FindData.cFileName);
	strcpy(dir->dirent.d_name, dir->Win32FindData.cFileName);
	return &dir->dirent;
}

/* Rewind a directory. */
void
rewinddir(DIR *dir)
{
	dir->Win32EntryCount = 0;
}

/* Close a directory. */
int
closedir(DIR *dir)
{
	if (dir->Win32DirectoryHandle != INVALID_HANDLE_VALUE)
		FindClose(dir->Win32DirectoryHandle);
	free(dir);
	return 0;
}

/* File sync: a nop. */
int
fsync(int fildes)
{
	return 0;
}

/* Sync: a nop. */
int
sync(void)
{
	return 0;
}

#endif	/* defined(_WIN32) */


/*------------------------- conversion functions ----------------------*/

static
void ConvertOutToMI(char *outmem,int outsize,char *mimem,int *misize){

   Pointer     sdram_base = (Pointer)mem_start;
   UInt        sdram_length = mem_end - mem_start;

   TMDwnLdr_Object_Handle handle;
   TMDwnLdr_Status tmdl_ret;

   Int         alignment;
   
   /* load the executable object and create handle */
   if((tmdl_ret = TMDwnLdr_load_object_from_mem(outmem,outsize,Null,&handle)) != TMDwnLdr_OK) {
      fprintf(stdout, "Error TMDwnLdr_load_object_from_mem: %s\n", TMDwnLdr_get_last_error(tmdl_ret) );
      exit(-1);
   }
   
   /* if image should be unshuffled */
   if(unshuffled  == True || download_unshuffled == True){
      /* tell down loader to unshuffle image */
      TMDwnLdr_set_unshuffled(handle);
   }

   /* get the minimal image size */
   if((tmdl_ret = TMDwnLdr_get_image_size(handle, misize, &alignment)) != TMDwnLdr_OK) {
      fprintf(stdout, "Error TMDwnLdr_get_image_size: %s\n", TMDwnLdr_get_last_error(tmdl_ret) );
      exit(-1);
   }
   
   /* check if image size is too large */
   if(*misize > (Int) sdram_length)
      printf("Memory image 0x%x is larger than SDRAM 0x%x\n",*misize,(Int) sdram_length );
      
   if((Int) sdram_base % alignment != 0)
      printf("SDRAM Base 0x%x not aligned on a 64 byte boundary\n",sdram_base );

   /* resolve symbol - not used with nohost */
   if(host_int != tmNoHost){
      /* cheat a little bit */
      lv_syscall = mmio_base;
      
      if((tmdl_ret = TMDwnLdr_resolve_symbol(handle, "__syscall", (Int) lv_syscall)) != TMDwnLdr_OK) {
         fprintf(stdout, "Error TMDwnLdr_resolve_symbol: %s\n", TMDwnLdr_get_last_error(tmdl_ret) );
         exit(-1);
      }
   }

   /* relocate the executable */
   if((tmdl_ret = TMDwnLdr_relocate(handle, (tmHostType_t) host_int,
         (Address) mmio_base, (UInt) tm_freq, sdram_base,
         sdram_length,cache_support)) != TMDwnLdr_OK) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性做爰猛烈叫床潮| 夜夜嗨av一区二区三区中文字幕 | 欧美日韩一区二区欧美激情| 久久久久国产精品厨房| 国产91对白在线观看九色| 中文字幕欧美区| 久久99精品久久久久| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲同性同志一二三专区| 国产一区二区精品久久99| 欧美国产精品一区二区三区| 国产无一区二区| 91丨九色丨国产丨porny| 亚洲午夜国产一区99re久久| 欧美日韩在线免费视频| 欧美三级资源在线| 国产午夜精品一区二区三区四区| 国产欧美视频一区二区| 日韩欧美亚洲国产另类| av不卡免费在线观看| 美美哒免费高清在线观看视频一区二区| 91精品国产综合久久蜜臀| 国产成人精品免费| 国产精品一区二区x88av| 日韩精品福利网| 亚洲一区二区三区国产| 一级中文字幕一区二区| eeuss影院一区二区三区| 久久综合久久鬼色| 国内一区二区在线| 9久草视频在线视频精品| 国产免费成人在线视频| 99re热这里只有精品视频| 欧美日韩1区2区| 国产精品国产三级国产aⅴ中文 | 一本大道久久a久久综合婷婷| 欧美性猛交xxxxxxxx| 午夜a成v人精品| av一区二区三区| 亚洲精品乱码久久久久| 韩国视频一区二区| 亚洲精品在线电影| 男女男精品网站| 欧美综合久久久| 一色屋精品亚洲香蕉网站| 国内精品久久久久影院色| 国产精品久久久一本精品 | 日日摸夜夜添夜夜添国产精品| 91精品国产乱| 午夜不卡av免费| 国产人久久人人人人爽| 欧美一二三区在线| 一区二区三区四区在线播放| 91精品国产色综合久久ai换脸 | 欧美一区二区三区视频免费| av午夜精品一区二区三区| 久久成人久久爱| 久久午夜色播影院免费高清| 欧美视频日韩视频在线观看| 99久免费精品视频在线观看| 国产电影一区在线| 美日韩一区二区三区| 亚洲一二三四久久| 亚洲成人第一页| 久久先锋影音av| 久久久久久影视| 久久精品视频一区二区三区| 久久免费看少妇高潮| 日韩欧美一区在线观看| 久久一留热品黄| 久久久久国产一区二区三区四区| 日韩久久久久久| 国产亚洲综合性久久久影院| 久久久.com| 亚洲色图视频网站| 天天操天天干天天综合网| 三级不卡在线观看| 国产美女一区二区三区| jlzzjlzz亚洲女人18| 欧美日韩一二三区| 久久久一区二区| 亚洲一区二区欧美| 国产成人精品亚洲777人妖 | 亚洲自拍偷拍综合| 国产一区视频导航| 在线91免费看| 中文字幕一区二区视频| 日本美女一区二区| 亚洲免费观看视频| 国产精品视频一区二区三区不卡| 91精品国产欧美一区二区18| 国产视频911| 精品午夜久久福利影院| 色婷婷av一区二区三区之一色屋| 欧美大胆一级视频| 亚洲午夜久久久久| 99视频精品在线| 久久久午夜精品理论片中文字幕| 日韩国产精品久久| 在线观看视频91| 亚洲激情男女视频| 99在线精品免费| 中文字幕一区二区三区在线观看 | 精品成人一区二区三区| 午夜精品123| 91精品国产欧美一区二区成人 | 丁香啪啪综合成人亚洲小说| 国产精品一区二区三区网站| 2023国产精品自拍| 国产精品99久久久| 亚洲伦理在线免费看| 欧美日韩在线不卡| 久久99蜜桃精品| 亚洲国产成人私人影院tom| aaa国产一区| 美国三级日本三级久久99| 久久噜噜亚洲综合| 成人av在线播放网址| 日韩欧美国产综合| 高清不卡一区二区在线| 午夜欧美视频在线观看| 欧美成人精品1314www| 亚洲一区二区av电影| 精品美女一区二区| 91免费国产在线观看| 美洲天堂一区二卡三卡四卡视频| 日韩精品一区二区三区在线| 色八戒一区二区三区| 亚洲视频一二区| 欧美一区二区三区视频| 色综合一区二区三区| 中日韩av电影| 精品国产凹凸成av人网站| 欧美午夜片在线观看| 91热门视频在线观看| 成人在线一区二区三区| 国产在线观看免费一区| 亚洲超丰满肉感bbw| 亚洲天堂成人在线观看| 国产日韩精品一区二区三区在线| 欧美一级日韩免费不卡| 欧美一区二区三区四区五区 | 秋霞成人午夜伦在线观看| 亚洲成人免费看| 亚洲第一成年网| 污片在线观看一区二区| 污片在线观看一区二区| 亚洲不卡av一区二区三区| 亚洲成人综合网站| 免费精品视频在线| 国产在线看一区| 成人深夜在线观看| 日本韩国视频一区二区| 欧美裸体一区二区三区| 国产v综合v亚洲欧| 成人h版在线观看| 欧美在线观看视频一区二区三区| 欧美性一区二区| 久久久亚洲午夜电影| 亚洲美女少妇撒尿| 日韩制服丝袜av| 高潮精品一区videoshd| 欧美三电影在线| 中文字幕在线免费不卡| 日韩国产欧美三级| 成人av电影免费观看| 日韩欧美亚洲另类制服综合在线| 国产欧美一区二区精品性| 一区二区三区**美女毛片| 久久精品国产亚洲高清剧情介绍| 高清shemale亚洲人妖| 久久蜜桃av一区精品变态类天堂 | 在线免费观看日韩欧美| 欧美精品一区二区久久久| 亚洲综合清纯丝袜自拍| 丁香激情综合国产| 日韩一区二区影院| 天天综合色天天综合色h| 99久久免费精品高清特色大片| 久久久久久电影| 极品尤物av久久免费看| 欧美一区二区黄色| 亚洲成人免费在线| 欧美日韩中文国产| 亚洲小少妇裸体bbw| 91热门视频在线观看| 亚洲欧美激情插| 91久久精品网| 丝瓜av网站精品一区二区 | 99免费精品在线观看| 中文字幕乱码日本亚洲一区二区| 国产91精品欧美| 国产精品福利av| 欧美日韩另类国产亚洲欧美一级| 亚洲成人综合网站| 欧美刺激午夜性久久久久久久| 国产福利一区二区三区| 综合av第一页| 欧美一级黄色大片| 99久久99久久精品国产片果冻|