├── Makefile ├── README.md ├── arp.c ├── comm.c ├── common.h ├── fic8120.h ├── flashcp.c ├── fmjpeg_avcodec.h ├── fmpeg4_avcodec.c ├── fmpeg4_avcodec.h ├── fmpeg4_version.h ├── fortify.c ├── gpio.c ├── include ├── g711.h └── image.h ├── info.c ├── interface.c ├── lib ├── jpeg-6b-arm │ ├── Makefile │ ├── Makefile~ │ ├── README │ ├── ansi2knr.1 │ ├── ansi2knr.c │ ├── cderror.h │ ├── cdjpeg.c │ ├── cdjpeg.h │ ├── cdjpeg.o │ ├── change.log │ ├── cjpeg │ ├── cjpeg.1 │ ├── cjpeg.c │ ├── cjpeg.o │ ├── ckconfig.c │ ├── coderules.doc │ ├── config.guess │ ├── config.sub │ ├── configure │ ├── djpeg │ ├── djpeg.1 │ ├── djpeg.c │ ├── djpeg.o │ ├── example.c │ ├── filelist.doc │ ├── install-sh │ ├── install.doc │ ├── jcapimin.c │ ├── jcapimin.o │ ├── jcapistd.c │ ├── jcapistd.o │ ├── jccoefct.c │ ├── jccoefct.o │ ├── jccolor.c │ ├── jccolor.o │ ├── jcdctmgr.c │ ├── jcdctmgr.o │ ├── jchuff.c │ ├── jchuff.h │ ├── jchuff.o │ ├── jcinit.c │ ├── jcinit.o │ ├── jcmainct.c │ ├── jcmainct.o │ ├── jcmarker.c │ ├── jcmarker.o │ ├── jcmaster.c │ ├── jcmaster.o │ ├── jcomapi.c │ ├── jcomapi.o │ ├── jconfig.bcc │ ├── jconfig.cfg │ ├── jconfig.dj │ ├── jconfig.doc │ ├── jconfig.h │ ├── jconfig.mac │ ├── jconfig.manx │ ├── jconfig.mc6 │ ├── jconfig.sas │ ├── jconfig.st │ ├── jconfig.vc │ ├── jconfig.vms │ ├── jconfig.wat │ ├── jcparam.c │ ├── jcparam.o │ ├── jcphuff.c │ ├── jcphuff.o │ ├── jcprepct.c │ ├── jcprepct.o │ ├── jcsample.c │ ├── jcsample.o │ ├── jctrans.c │ ├── jctrans.o │ ├── jdapimin.c │ ├── jdapimin.o │ ├── jdapistd.c │ ├── jdapistd.o │ ├── jdatadst.c │ ├── jdatadst.o │ ├── jdatasrc.c │ ├── jdatasrc.o │ ├── jdcoefct.c │ ├── jdcoefct.o │ ├── jdcolor.c │ ├── jdcolor.o │ ├── jdct.h │ ├── jddctmgr.c │ ├── jddctmgr.o │ ├── jdhuff.c │ ├── jdhuff.h │ ├── jdhuff.o │ ├── jdinput.c │ ├── jdinput.o │ ├── jdmainct.c │ ├── jdmainct.o │ ├── jdmarker.c │ ├── jdmarker.o │ ├── jdmaster.c │ ├── jdmaster.o │ ├── jdmerge.c │ ├── jdmerge.o │ ├── jdphuff.c │ ├── jdphuff.o │ ├── jdpostct.c │ ├── jdpostct.o │ ├── jdsample.c │ ├── jdsample.o │ ├── jdtrans.c │ ├── jdtrans.o │ ├── jerror.c │ ├── jerror.h │ ├── jerror.o │ ├── jfdctflt.c │ ├── jfdctflt.o │ ├── jfdctfst.c │ ├── jfdctfst.o │ ├── jfdctint.c │ ├── jfdctint.o │ ├── jidctflt.c │ ├── jidctflt.o │ ├── jidctfst.c │ ├── jidctfst.o │ ├── jidctint.c │ ├── jidctint.o │ ├── jidctred.c │ ├── jidctred.o │ ├── jinclude.h │ ├── jmemansi.c │ ├── jmemdos.c │ ├── jmemdosa.asm │ ├── jmemmac.c │ ├── jmemmgr.c │ ├── jmemmgr.o │ ├── jmemname.c │ ├── jmemnobs.c │ ├── jmemnobs.o │ ├── jmemsys.h │ ├── jmorecfg.h │ ├── jpegint.h │ ├── jpeglib.h │ ├── jpegtran │ ├── jpegtran.1 │ ├── jpegtran.c │ ├── jpegtran.o │ ├── jquant1.c │ ├── jquant1.o │ ├── jquant2.c │ ├── jquant2.o │ ├── jutils.c │ ├── jutils.o │ ├── jversion.h │ ├── libjpeg.a │ ├── libjpeg.doc │ ├── ltconfig │ ├── ltmain.sh │ ├── makcjpeg.st │ ├── makdjpeg.st │ ├── makeapps.ds │ ├── makefile.ansi │ ├── makefile.bcc │ ├── makefile.cfg │ ├── makefile.dj │ ├── makefile.manx │ ├── makefile.mc6 │ ├── makefile.mms │ ├── makefile.sas │ ├── makefile.unix │ ├── makefile.vc │ ├── makefile.vms │ ├── makefile.wat │ ├── makelib.ds │ ├── makeproj.mac │ ├── makljpeg.st │ ├── maktjpeg.st │ ├── makvms.opt │ ├── rdbmp.c │ ├── rdbmp.o │ ├── rdcolmap.c │ ├── rdcolmap.o │ ├── rdgif.c │ ├── rdgif.o │ ├── rdjpgcom │ ├── rdjpgcom.1 │ ├── rdjpgcom.c │ ├── rdjpgcom.o │ ├── rdppm.c │ ├── rdppm.o │ ├── rdrle.c │ ├── rdrle.o │ ├── rdswitch.c │ ├── rdswitch.o │ ├── rdtarga.c │ ├── rdtarga.o │ ├── structure.doc │ ├── testimg.bmp │ ├── testimg.jpg │ ├── testimg.ppm │ ├── testimgp.jpg │ ├── testorig.jpg │ ├── testprog.jpg │ ├── transupp.c │ ├── transupp.h │ ├── transupp.o │ ├── usage.doc │ ├── wizard.doc │ ├── wrbmp.c │ ├── wrbmp.o │ ├── wrgif.c │ ├── wrgif.o │ ├── wrjpgcom │ ├── wrjpgcom.1 │ ├── wrjpgcom.c │ ├── wrjpgcom.o │ ├── wrppm.c │ ├── wrppm.o │ ├── wrrle.c │ ├── wrrle.o │ ├── wrtarga.c │ └── wrtarga.o ├── libg711 │ ├── Makefile │ ├── g711core.c │ └── g711core.h ├── libimage │ ├── Makefile │ ├── image.c │ └── image.h └── libyuv │ ├── Makefile │ ├── jpeglib.c │ ├── jpegutils.c │ ├── jpegutils.h │ └── yuv2rgb.c ├── liba ├── libg711.a ├── libimage.a ├── libjpeg.a └── libyuv.a ├── mtd ├── CVS │ ├── Entries │ ├── Repository │ └── Root ├── inftl-user.h ├── jffs2-user.h ├── mtd-abi.h ├── mtd-user.h └── nftl-user.h ├── picture.c ├── ratecontrol.c ├── ratecontrol.h ├── setup.c ├── sndtools.c ├── sndtools.h ├── sound70.c ├── talk.c ├── udp.c └── wiring.c /Makefile: -------------------------------------------------------------------------------- 1 | EXENAME = /tftpboot/sound70 2 | 3 | CC = /usr/local/arm/2.95.3/bin/arm-linux-gcc 4 | CFLAGS = 5 | INCLUDE = 6 | LIBS = -lpthread 7 | DEP_LIBS = ./liba/libyuv.a ./liba/libjpeg.a ./liba/libg711.a ./liba/libimage.a 8 | HEADER = 9 | OBJS = sound70.o sndtools.o udp.o comm.o ratecontrol.o fmpeg4_avcodec.o interface.o gpio.o talk.o setup.o arp.o flashcp.o 10 | 11 | all: $(EXENAME) 12 | 13 | .c.o: 14 | $(CC) -c $(CFLAGS) $(INCLUDE) $< 15 | 16 | $(EXENAME): $(OBJS) 17 | $(CC) -o $(EXENAME) $(OBJS) $(LIBS) $(DEP_LIBS) 18 | 19 | clean: 20 | rm -f *.o a.out $(EXENAME) core *~ 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # videotalkroom 2 | 基于嵌入式Linux的一套可视对讲设备代码,比较底层,写的比较好,里面的lib库是一些图像处理库。et。 3 | -------------------------------------------------------------------------------- /arp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/arp.c -------------------------------------------------------------------------------- /comm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/comm.c -------------------------------------------------------------------------------- /common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/common.h -------------------------------------------------------------------------------- /flashcp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/flashcp.c -------------------------------------------------------------------------------- /fmpeg4_avcodec.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/fmpeg4_avcodec.c -------------------------------------------------------------------------------- /fmpeg4_version.h: -------------------------------------------------------------------------------- 1 | #ifndef _FMPEG4_VERSION_H_ 2 | #define _FMPEG4_VERSION_H_ 3 | /* 4 | Version 1.0: Add H263 support, fix encoder ME copy timming issue 5 | Version 1.1: Add motion dection and ROI setting 6 | Version 1.2: optimized motion dection 7 | fix consistent_free parameter bug 8 | Version 1.3: add key check function 9 | Version 1.5: Update architecture 10 | Version 1.6: Update from TC for GM8180 11 | Version 1.9: Add module_time_base 12 | Version 2.0: Upgrade to GM Version, add check version type 13 | Version 2.1: Add special mpeg4 deinterlace display feature for GM8120 14 | Version 2.2: Update for data sync issue 15 | Version 2.3: Update for data sync issue 2 16 | */ 17 | #define MP4VER 0x00020003 18 | #define MP4VER_MAJOR (MP4VER>>16) 19 | #define MP4VER_MINOR (MP4VER&0xffff) 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /fortify.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/fortify.c -------------------------------------------------------------------------------- /gpio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/gpio.c -------------------------------------------------------------------------------- /include/g711.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * g711.h 4 | * 5 | * u-law, A-law and linear PCM conversions. 6 | */ 7 | 8 | #ifndef G711_H 9 | #define G711_H 10 | 11 | extern void G711Encoder(short *pcm,unsigned char *code,int size,int lawflag); 12 | extern void G711Decoder(short *pcm,unsigned char *code,int size,int lawflag); 13 | 14 | 15 | #endif /* G711_H */ 16 | -------------------------------------------------------------------------------- /include/image.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/include/image.h -------------------------------------------------------------------------------- /info.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/info.c -------------------------------------------------------------------------------- /interface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/interface.c -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/ansi2knr.1: -------------------------------------------------------------------------------- 1 | .TH ANSI2KNR 1 "19 Jan 1996" 2 | .SH NAME 3 | ansi2knr \- convert ANSI C to Kernighan & Ritchie C 4 | .SH SYNOPSIS 5 | .I ansi2knr 6 | [--varargs] input_file [output_file] 7 | .SH DESCRIPTION 8 | If no output_file is supplied, output goes to stdout. 9 | .br 10 | There are no error messages. 11 | .sp 12 | .I ansi2knr 13 | recognizes function definitions by seeing a non-keyword identifier at the left 14 | margin, followed by a left parenthesis, with a right parenthesis as the last 15 | character on the line, and with a left brace as the first token on the 16 | following line (ignoring possible intervening comments). It will recognize a 17 | multi-line header provided that no intervening line ends with a left or right 18 | brace or a semicolon. These algorithms ignore whitespace and comments, except 19 | that the function name must be the first thing on the line. 20 | .sp 21 | The following constructs will confuse it: 22 | .br 23 | - Any other construct that starts at the left margin and follows the 24 | above syntax (such as a macro or function call). 25 | .br 26 | - Some macros that tinker with the syntax of the function header. 27 | .sp 28 | The --varargs switch is obsolete, and is recognized only for 29 | backwards compatibility. The present version of 30 | .I ansi2knr 31 | will always attempt to convert a ... argument to va_alist and va_dcl. 32 | .SH AUTHOR 33 | L. Peter Deutsch wrote the original ansi2knr and 34 | continues to maintain the current version; most of the code in the current 35 | version is his work. ansi2knr also includes contributions by Francois 36 | Pinard and Jim Avera . 37 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/cderror.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cderror.h 3 | * 4 | * Copyright (C) 1994-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file defines the error and message codes for the cjpeg/djpeg 9 | * applications. These strings are not needed as part of the JPEG library 10 | * proper. 11 | * Edit this file to add new codes, or to translate the message strings to 12 | * some other language. 13 | */ 14 | 15 | /* 16 | * To define the enum list of message codes, include this file without 17 | * defining macro JMESSAGE. To create a message string table, include it 18 | * again with a suitable JMESSAGE definition (see jerror.c for an example). 19 | */ 20 | #ifndef JMESSAGE 21 | #ifndef CDERROR_H 22 | #define CDERROR_H 23 | /* First time through, define the enum list */ 24 | #define JMAKE_ENUM_LIST 25 | #else 26 | /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ 27 | #define JMESSAGE(code,string) 28 | #endif /* CDERROR_H */ 29 | #endif /* JMESSAGE */ 30 | 31 | #ifdef JMAKE_ENUM_LIST 32 | 33 | typedef enum { 34 | 35 | #define JMESSAGE(code,string) code , 36 | 37 | #endif /* JMAKE_ENUM_LIST */ 38 | 39 | JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ 40 | 41 | #ifdef BMP_SUPPORTED 42 | JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") 43 | JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported") 44 | JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") 45 | JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") 46 | JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") 47 | JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") 48 | JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") 49 | JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image") 50 | JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") 51 | JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image") 52 | JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") 53 | #endif /* BMP_SUPPORTED */ 54 | 55 | #ifdef GIF_SUPPORTED 56 | JMESSAGE(JERR_GIF_BUG, "GIF output got confused") 57 | JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") 58 | JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") 59 | JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") 60 | JMESSAGE(JERR_GIF_NOT, "Not a GIF file") 61 | JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") 62 | JMESSAGE(JTRC_GIF_BADVERSION, 63 | "Warning: unexpected GIF version number '%c%c%c'") 64 | JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") 65 | JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") 66 | JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") 67 | JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") 68 | JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") 69 | JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") 70 | #endif /* GIF_SUPPORTED */ 71 | 72 | #ifdef PPM_SUPPORTED 73 | JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") 74 | JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") 75 | JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") 76 | JMESSAGE(JTRC_PGM, "%ux%u PGM image") 77 | JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") 78 | JMESSAGE(JTRC_PPM, "%ux%u PPM image") 79 | JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") 80 | #endif /* PPM_SUPPORTED */ 81 | 82 | #ifdef RLE_SUPPORTED 83 | JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") 84 | JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") 85 | JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") 86 | JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") 87 | JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") 88 | JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") 89 | JMESSAGE(JERR_RLE_NOT, "Not an RLE file") 90 | JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") 91 | JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") 92 | JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") 93 | JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") 94 | JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") 95 | JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") 96 | JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") 97 | #endif /* RLE_SUPPORTED */ 98 | 99 | #ifdef TARGA_SUPPORTED 100 | JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") 101 | JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") 102 | JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") 103 | JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") 104 | JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") 105 | JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") 106 | #else 107 | JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") 108 | #endif /* TARGA_SUPPORTED */ 109 | 110 | JMESSAGE(JERR_BAD_CMAP_FILE, 111 | "Color map file is invalid or of unsupported format") 112 | JMESSAGE(JERR_TOO_MANY_COLORS, 113 | "Output file format cannot handle %d colormap entries") 114 | JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") 115 | #ifdef TARGA_SUPPORTED 116 | JMESSAGE(JERR_UNKNOWN_FORMAT, 117 | "Unrecognized input file format --- perhaps you need -targa") 118 | #else 119 | JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") 120 | #endif 121 | JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") 122 | 123 | #ifdef JMAKE_ENUM_LIST 124 | 125 | JMSG_LASTADDONCODE 126 | } ADDON_MESSAGE_CODE; 127 | 128 | #undef JMAKE_ENUM_LIST 129 | #endif /* JMAKE_ENUM_LIST */ 130 | 131 | /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ 132 | #undef JMESSAGE 133 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/cdjpeg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cdjpeg.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains common support routines used by the IJG application 9 | * programs (cjpeg, djpeg, jpegtran). 10 | */ 11 | 12 | #include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ 13 | #include /* to declare isupper(), tolower() */ 14 | #ifdef NEED_SIGNAL_CATCHER 15 | #include /* to declare signal() */ 16 | #endif 17 | #ifdef USE_SETMODE 18 | #include /* to declare setmode()'s parameter macros */ 19 | /* If you have setmode() but not , just delete this line: */ 20 | #include /* to declare setmode() */ 21 | #endif 22 | 23 | 24 | /* 25 | * Signal catcher to ensure that temporary files are removed before aborting. 26 | * NB: for Amiga Manx C this is actually a global routine named _abort(); 27 | * we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus... 28 | */ 29 | 30 | #ifdef NEED_SIGNAL_CATCHER 31 | 32 | static j_common_ptr sig_cinfo; 33 | 34 | void /* must be global for Manx C */ 35 | signal_catcher (int signum) 36 | { 37 | if (sig_cinfo != NULL) { 38 | if (sig_cinfo->err != NULL) /* turn off trace output */ 39 | sig_cinfo->err->trace_level = 0; 40 | jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */ 41 | } 42 | exit(EXIT_FAILURE); 43 | } 44 | 45 | 46 | GLOBAL(void) 47 | enable_signal_catcher (j_common_ptr cinfo) 48 | { 49 | sig_cinfo = cinfo; 50 | #ifdef SIGINT /* not all systems have SIGINT */ 51 | signal(SIGINT, signal_catcher); 52 | #endif 53 | #ifdef SIGTERM /* not all systems have SIGTERM */ 54 | signal(SIGTERM, signal_catcher); 55 | #endif 56 | } 57 | 58 | #endif 59 | 60 | 61 | /* 62 | * Optional progress monitor: display a percent-done figure on stderr. 63 | */ 64 | 65 | #ifdef PROGRESS_REPORT 66 | 67 | METHODDEF(void) 68 | progress_monitor (j_common_ptr cinfo) 69 | { 70 | cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress; 71 | int total_passes = prog->pub.total_passes + prog->total_extra_passes; 72 | int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit); 73 | 74 | if (percent_done != prog->percent_done) { 75 | prog->percent_done = percent_done; 76 | if (total_passes > 1) { 77 | fprintf(stderr, "\rPass %d/%d: %3d%% ", 78 | prog->pub.completed_passes + prog->completed_extra_passes + 1, 79 | total_passes, percent_done); 80 | } else { 81 | fprintf(stderr, "\r %3d%% ", percent_done); 82 | } 83 | fflush(stderr); 84 | } 85 | } 86 | 87 | 88 | GLOBAL(void) 89 | start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress) 90 | { 91 | /* Enable progress display, unless trace output is on */ 92 | if (cinfo->err->trace_level == 0) { 93 | progress->pub.progress_monitor = progress_monitor; 94 | progress->completed_extra_passes = 0; 95 | progress->total_extra_passes = 0; 96 | progress->percent_done = -1; 97 | cinfo->progress = &progress->pub; 98 | } 99 | } 100 | 101 | 102 | GLOBAL(void) 103 | end_progress_monitor (j_common_ptr cinfo) 104 | { 105 | /* Clear away progress display */ 106 | if (cinfo->err->trace_level == 0) { 107 | fprintf(stderr, "\r \r"); 108 | fflush(stderr); 109 | } 110 | } 111 | 112 | #endif 113 | 114 | 115 | /* 116 | * Case-insensitive matching of possibly-abbreviated keyword switches. 117 | * keyword is the constant keyword (must be lower case already), 118 | * minchars is length of minimum legal abbreviation. 119 | */ 120 | 121 | GLOBAL(boolean) 122 | keymatch (char * arg, const char * keyword, int minchars) 123 | { 124 | register int ca, ck; 125 | register int nmatched = 0; 126 | 127 | while ((ca = *arg++) != '\0') { 128 | if ((ck = *keyword++) == '\0') 129 | return FALSE; /* arg longer than keyword, no good */ 130 | if (isupper(ca)) /* force arg to lcase (assume ck is already) */ 131 | ca = tolower(ca); 132 | if (ca != ck) 133 | return FALSE; /* no good */ 134 | nmatched++; /* count matched characters */ 135 | } 136 | /* reached end of argument; fail if it's too short for unique abbrev */ 137 | if (nmatched < minchars) 138 | return FALSE; 139 | return TRUE; /* A-OK */ 140 | } 141 | 142 | 143 | /* 144 | * Routines to establish binary I/O mode for stdin and stdout. 145 | * Non-Unix systems often require some hacking to get out of text mode. 146 | */ 147 | 148 | GLOBAL(FILE *) 149 | read_stdin (void) 150 | { 151 | FILE * input_file = stdin; 152 | 153 | #ifdef USE_SETMODE /* need to hack file mode? */ 154 | setmode(fileno(stdin), O_BINARY); 155 | #endif 156 | #ifdef USE_FDOPEN /* need to re-open in binary mode? */ 157 | if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) { 158 | fprintf(stderr, "Cannot reopen stdin\n"); 159 | exit(EXIT_FAILURE); 160 | } 161 | #endif 162 | return input_file; 163 | } 164 | 165 | 166 | GLOBAL(FILE *) 167 | write_stdout (void) 168 | { 169 | FILE * output_file = stdout; 170 | 171 | #ifdef USE_SETMODE /* need to hack file mode? */ 172 | setmode(fileno(stdout), O_BINARY); 173 | #endif 174 | #ifdef USE_FDOPEN /* need to re-open in binary mode? */ 175 | if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { 176 | fprintf(stderr, "Cannot reopen stdout\n"); 177 | exit(EXIT_FAILURE); 178 | } 179 | #endif 180 | return output_file; 181 | } 182 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/cdjpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cdjpeg.h 3 | * 4 | * Copyright (C) 1994-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains common declarations for the sample applications 9 | * cjpeg and djpeg. It is NOT used by the core JPEG library. 10 | */ 11 | 12 | #define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ 13 | #define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ 14 | #include "jinclude.h" 15 | #include "jpeglib.h" 16 | #include "jerror.h" /* get library error codes too */ 17 | #include "cderror.h" /* get application-specific error codes */ 18 | 19 | 20 | /* 21 | * Object interface for cjpeg's source file decoding modules 22 | */ 23 | 24 | typedef struct cjpeg_source_struct * cjpeg_source_ptr; 25 | 26 | struct cjpeg_source_struct { 27 | JMETHOD(void, start_input, (j_compress_ptr cinfo, 28 | cjpeg_source_ptr sinfo)); 29 | JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, 30 | cjpeg_source_ptr sinfo)); 31 | JMETHOD(void, finish_input, (j_compress_ptr cinfo, 32 | cjpeg_source_ptr sinfo)); 33 | 34 | FILE *input_file; 35 | 36 | JSAMPARRAY buffer; 37 | JDIMENSION buffer_height; 38 | }; 39 | 40 | 41 | /* 42 | * Object interface for djpeg's output file encoding modules 43 | */ 44 | 45 | typedef struct djpeg_dest_struct * djpeg_dest_ptr; 46 | 47 | struct djpeg_dest_struct { 48 | /* start_output is called after jpeg_start_decompress finishes. 49 | * The color map will be ready at this time, if one is needed. 50 | */ 51 | JMETHOD(void, start_output, (j_decompress_ptr cinfo, 52 | djpeg_dest_ptr dinfo)); 53 | /* Emit the specified number of pixel rows from the buffer. */ 54 | JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, 55 | djpeg_dest_ptr dinfo, 56 | JDIMENSION rows_supplied)); 57 | /* Finish up at the end of the image. */ 58 | JMETHOD(void, finish_output, (j_decompress_ptr cinfo, 59 | djpeg_dest_ptr dinfo)); 60 | 61 | /* Target file spec; filled in by djpeg.c after object is created. */ 62 | FILE * output_file; 63 | 64 | /* Output pixel-row buffer. Created by module init or start_output. 65 | * Width is cinfo->output_width * cinfo->output_components; 66 | * height is buffer_height. 67 | */ 68 | JSAMPARRAY buffer; 69 | JDIMENSION buffer_height; 70 | }; 71 | 72 | 73 | /* 74 | * cjpeg/djpeg may need to perform extra passes to convert to or from 75 | * the source/destination file format. The JPEG library does not know 76 | * about these passes, but we'd like them to be counted by the progress 77 | * monitor. We use an expanded progress monitor object to hold the 78 | * additional pass count. 79 | */ 80 | 81 | struct cdjpeg_progress_mgr { 82 | struct jpeg_progress_mgr pub; /* fields known to JPEG library */ 83 | int completed_extra_passes; /* extra passes completed */ 84 | int total_extra_passes; /* total extra */ 85 | /* last printed percentage stored here to avoid multiple printouts */ 86 | int percent_done; 87 | }; 88 | 89 | typedef struct cdjpeg_progress_mgr * cd_progress_ptr; 90 | 91 | 92 | /* Short forms of external names for systems with brain-damaged linkers. */ 93 | 94 | #ifdef NEED_SHORT_EXTERNAL_NAMES 95 | #define jinit_read_bmp jIRdBMP 96 | #define jinit_write_bmp jIWrBMP 97 | #define jinit_read_gif jIRdGIF 98 | #define jinit_write_gif jIWrGIF 99 | #define jinit_read_ppm jIRdPPM 100 | #define jinit_write_ppm jIWrPPM 101 | #define jinit_read_rle jIRdRLE 102 | #define jinit_write_rle jIWrRLE 103 | #define jinit_read_targa jIRdTarga 104 | #define jinit_write_targa jIWrTarga 105 | #define read_quant_tables RdQTables 106 | #define read_scan_script RdScnScript 107 | #define set_quant_slots SetQSlots 108 | #define set_sample_factors SetSFacts 109 | #define read_color_map RdCMap 110 | #define enable_signal_catcher EnSigCatcher 111 | #define start_progress_monitor StProgMon 112 | #define end_progress_monitor EnProgMon 113 | #define read_stdin RdStdin 114 | #define write_stdout WrStdout 115 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 116 | 117 | /* Module selection routines for I/O modules. */ 118 | 119 | EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); 120 | EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, 121 | boolean is_os2)); 122 | EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); 123 | EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); 124 | EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); 125 | EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); 126 | EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); 127 | EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); 128 | EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); 129 | EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); 130 | 131 | /* cjpeg support routines (in rdswitch.c) */ 132 | 133 | EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, 134 | int scale_factor, boolean force_baseline)); 135 | EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); 136 | EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); 137 | EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); 138 | 139 | /* djpeg support routines (in rdcolmap.c) */ 140 | 141 | EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); 142 | 143 | /* common support routines (in cdjpeg.c) */ 144 | 145 | EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); 146 | EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, 147 | cd_progress_ptr progress)); 148 | EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); 149 | EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); 150 | EXTERN(FILE *) read_stdin JPP((void)); 151 | EXTERN(FILE *) write_stdout JPP((void)); 152 | 153 | /* miscellaneous useful macros */ 154 | 155 | #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ 156 | #define READ_BINARY "r" 157 | #define WRITE_BINARY "w" 158 | #else 159 | #ifdef VMS /* VMS is very nonstandard */ 160 | #define READ_BINARY "rb", "ctx=stm" 161 | #define WRITE_BINARY "wb", "ctx=stm" 162 | #else /* standard ANSI-compliant case */ 163 | #define READ_BINARY "rb" 164 | #define WRITE_BINARY "wb" 165 | #endif 166 | #endif 167 | 168 | #ifndef EXIT_FAILURE /* define exit() codes if not provided */ 169 | #define EXIT_FAILURE 1 170 | #endif 171 | #ifndef EXIT_SUCCESS 172 | #ifdef VMS 173 | #define EXIT_SUCCESS 1 /* VMS is very nonstandard */ 174 | #else 175 | #define EXIT_SUCCESS 0 176 | #endif 177 | #endif 178 | #ifndef EXIT_WARNING 179 | #ifdef VMS 180 | #define EXIT_WARNING 1 /* VMS is very nonstandard */ 181 | #else 182 | #define EXIT_WARNING 2 183 | #endif 184 | #endif 185 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/cdjpeg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/cdjpeg.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/cjpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/cjpeg -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/cjpeg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/cjpeg.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/coderules.doc: -------------------------------------------------------------------------------- 1 | IJG JPEG LIBRARY: CODING RULES 2 | 3 | Copyright (C) 1991-1996, Thomas G. Lane. 4 | This file is part of the Independent JPEG Group's software. 5 | For conditions of distribution and use, see the accompanying README file. 6 | 7 | 8 | Since numerous people will be contributing code and bug fixes, it's important 9 | to establish a common coding style. The goal of using similar coding styles 10 | is much more important than the details of just what that style is. 11 | 12 | In general we follow the recommendations of "Recommended C Style and Coding 13 | Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and 14 | Brader). This document is available in the IJG FTP archive (see 15 | jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl). 16 | 17 | Block comments should be laid out thusly: 18 | 19 | /* 20 | * Block comments in this style. 21 | */ 22 | 23 | We indent statements in K&R style, e.g., 24 | if (test) { 25 | then-part; 26 | } else { 27 | else-part; 28 | } 29 | with two spaces per indentation level. (This indentation convention is 30 | handled automatically by GNU Emacs and many other text editors.) 31 | 32 | Multi-word names should be written in lower case with underscores, e.g., 33 | multi_word_name (not multiWordName). Preprocessor symbols and enum constants 34 | are similar but upper case (MULTI_WORD_NAME). Names should be unique within 35 | the first fifteen characters. (On some older systems, global names must be 36 | unique within six characters. We accommodate this without cluttering the 37 | source code by using macros to substitute shorter names.) 38 | 39 | We use function prototypes everywhere; we rely on automatic source code 40 | transformation to feed prototype-less C compilers. Transformation is done 41 | by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript). 42 | ansi2knr is not very bright, so it imposes a format requirement on function 43 | declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions 44 | should be written in the following style: 45 | 46 | LOCAL(int *) 47 | function_name (int a, char *b) 48 | { 49 | code... 50 | } 51 | 52 | Note that each function definition must begin with GLOBAL(type), LOCAL(type), 53 | or METHODDEF(type). These macros expand to "static type" or just "type" as 54 | appropriate. They provide a readable indication of the routine's usage and 55 | can readily be changed for special needs. (For instance, special linkage 56 | keywords can be inserted for use in Windows DLLs.) 57 | 58 | ansi2knr does not transform method declarations (function pointers in 59 | structs). We handle these with a macro JMETHOD, defined as 60 | #ifdef HAVE_PROTOTYPES 61 | #define JMETHOD(type,methodname,arglist) type (*methodname) arglist 62 | #else 63 | #define JMETHOD(type,methodname,arglist) type (*methodname) () 64 | #endif 65 | which is used like this: 66 | struct function_pointers { 67 | JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp)); 68 | JMETHOD(void, term_entropy_encoder, (void)); 69 | }; 70 | Note the set of parentheses surrounding the parameter list. 71 | 72 | A similar solution is used for forward and external function declarations 73 | (see the EXTERN and JPP macros). 74 | 75 | If the code is to work on non-ANSI compilers, we cannot rely on a prototype 76 | declaration to coerce actual parameters into the right types. Therefore, use 77 | explicit casts on actual parameters whenever the actual parameter type is not 78 | identical to the formal parameter. Beware of implicit conversions to "int". 79 | 80 | It seems there are some non-ANSI compilers in which the sizeof() operator 81 | is defined to return int, yet size_t is defined as long. Needless to say, 82 | this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(), 83 | so that the result is guaranteed to be of type size_t. 84 | 85 | 86 | The JPEG library is intended to be used within larger programs. Furthermore, 87 | we want it to be reentrant so that it can be used by applications that process 88 | multiple images concurrently. The following rules support these requirements: 89 | 90 | 1. Avoid direct use of file I/O, "malloc", error report printouts, etc; 91 | pass these through the common routines provided. 92 | 93 | 2. Minimize global namespace pollution. Functions should be declared static 94 | wherever possible. (Note that our method-based calling conventions help this 95 | a lot: in many modules only the initialization function will ever need to be 96 | called directly, so only that function need be externally visible.) All 97 | global function names should begin with "jpeg_", and should have an 98 | abbreviated name (unique in the first six characters) substituted by macro 99 | when NEED_SHORT_EXTERNAL_NAMES is set. 100 | 101 | 3. Don't use global variables; anything that must be used in another module 102 | should be in the common data structures. 103 | 104 | 4. Don't use static variables except for read-only constant tables. Variables 105 | that should be private to a module can be placed into private structures (see 106 | the system architecture document, structure.doc). 107 | 108 | 5. Source file names should begin with "j" for files that are part of the 109 | library proper; source files that are not part of the library, such as cjpeg.c 110 | and djpeg.c, do not begin with "j". Keep source file names to eight 111 | characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep 112 | compression and decompression code in separate source files --- some 113 | applications may want only one half of the library. 114 | 115 | Note: these rules (particularly #4) are not followed religiously in the 116 | modules that are used in cjpeg/djpeg but are not part of the JPEG library 117 | proper. Those modules are not really intended to be used in other 118 | applications. 119 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/djpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/djpeg -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/djpeg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/djpeg.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # install - install a program, script, or datafile 4 | # This comes from X11R5 (mit/util/scripts/install.sh). 5 | # 6 | # Copyright 1991 by the Massachusetts Institute of Technology 7 | # 8 | # Permission to use, copy, modify, distribute, and sell this software and its 9 | # documentation for any purpose is hereby granted without fee, provided that 10 | # the above copyright notice appear in all copies and that both that 11 | # copyright notice and this permission notice appear in supporting 12 | # documentation, and that the name of M.I.T. not be used in advertising or 13 | # publicity pertaining to distribution of the software without specific, 14 | # written prior permission. M.I.T. makes no representations about the 15 | # suitability of this software for any purpose. It is provided "as is" 16 | # without express or implied warranty. 17 | # 18 | # Calling this script install-sh is preferred over install.sh, to prevent 19 | # `make' implicit rules from creating a file called install from it 20 | # when there is no Makefile. 21 | # 22 | # This script is compatible with the BSD install script, but was written 23 | # from scratch. It can only install one file at a time, a restriction 24 | # shared with many OS's install programs. 25 | 26 | 27 | # set DOITPROG to echo to test this script 28 | 29 | # Don't use :- since 4.3BSD and earlier shells don't like it. 30 | doit="${DOITPROG-}" 31 | 32 | 33 | # put in absolute paths if you don't have them in your path; or use env. vars. 34 | 35 | mvprog="${MVPROG-mv}" 36 | cpprog="${CPPROG-cp}" 37 | chmodprog="${CHMODPROG-chmod}" 38 | chownprog="${CHOWNPROG-chown}" 39 | chgrpprog="${CHGRPPROG-chgrp}" 40 | stripprog="${STRIPPROG-strip}" 41 | rmprog="${RMPROG-rm}" 42 | mkdirprog="${MKDIRPROG-mkdir}" 43 | 44 | transformbasename="" 45 | transform_arg="" 46 | instcmd="$mvprog" 47 | chmodcmd="$chmodprog 0755" 48 | chowncmd="" 49 | chgrpcmd="" 50 | stripcmd="" 51 | rmcmd="$rmprog -f" 52 | mvcmd="$mvprog" 53 | src="" 54 | dst="" 55 | dir_arg="" 56 | 57 | while [ x"$1" != x ]; do 58 | case $1 in 59 | -c) instcmd="$cpprog" 60 | shift 61 | continue;; 62 | 63 | -d) dir_arg=true 64 | shift 65 | continue;; 66 | 67 | -m) chmodcmd="$chmodprog $2" 68 | shift 69 | shift 70 | continue;; 71 | 72 | -o) chowncmd="$chownprog $2" 73 | shift 74 | shift 75 | continue;; 76 | 77 | -g) chgrpcmd="$chgrpprog $2" 78 | shift 79 | shift 80 | continue;; 81 | 82 | -s) stripcmd="$stripprog" 83 | shift 84 | continue;; 85 | 86 | -t=*) transformarg=`echo $1 | sed 's/-t=//'` 87 | shift 88 | continue;; 89 | 90 | -b=*) transformbasename=`echo $1 | sed 's/-b=//'` 91 | shift 92 | continue;; 93 | 94 | *) if [ x"$src" = x ] 95 | then 96 | src=$1 97 | else 98 | # this colon is to work around a 386BSD /bin/sh bug 99 | : 100 | dst=$1 101 | fi 102 | shift 103 | continue;; 104 | esac 105 | done 106 | 107 | if [ x"$src" = x ] 108 | then 109 | echo "install: no input file specified" 110 | exit 1 111 | else 112 | true 113 | fi 114 | 115 | if [ x"$dir_arg" != x ]; then 116 | dst=$src 117 | src="" 118 | 119 | if [ -d $dst ]; then 120 | instcmd=: 121 | else 122 | instcmd=mkdir 123 | fi 124 | else 125 | 126 | # Waiting for this to be detected by the "$instcmd $src $dsttmp" command 127 | # might cause directories to be created, which would be especially bad 128 | # if $src (and thus $dsttmp) contains '*'. 129 | 130 | if [ -f $src -o -d $src ] 131 | then 132 | true 133 | else 134 | echo "install: $src does not exist" 135 | exit 1 136 | fi 137 | 138 | if [ x"$dst" = x ] 139 | then 140 | echo "install: no destination specified" 141 | exit 1 142 | else 143 | true 144 | fi 145 | 146 | # If destination is a directory, append the input filename; if your system 147 | # does not like double slashes in filenames, you may need to add some logic 148 | 149 | if [ -d $dst ] 150 | then 151 | dst="$dst"/`basename $src` 152 | else 153 | true 154 | fi 155 | fi 156 | 157 | ## this sed command emulates the dirname command 158 | dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` 159 | 160 | # Make sure that the destination directory exists. 161 | # this part is taken from Noah Friedman's mkinstalldirs script 162 | 163 | # Skip lots of stat calls in the usual case. 164 | if [ ! -d "$dstdir" ]; then 165 | defaultIFS=' 166 | ' 167 | IFS="${IFS-${defaultIFS}}" 168 | 169 | oIFS="${IFS}" 170 | # Some sh's can't handle IFS=/ for some reason. 171 | IFS='%' 172 | set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` 173 | IFS="${oIFS}" 174 | 175 | pathcomp='' 176 | 177 | while [ $# -ne 0 ] ; do 178 | pathcomp="${pathcomp}${1}" 179 | shift 180 | 181 | if [ ! -d "${pathcomp}" ] ; 182 | then 183 | $mkdirprog "${pathcomp}" 184 | else 185 | true 186 | fi 187 | 188 | pathcomp="${pathcomp}/" 189 | done 190 | fi 191 | 192 | if [ x"$dir_arg" != x ] 193 | then 194 | $doit $instcmd $dst && 195 | 196 | if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && 197 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && 198 | if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && 199 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi 200 | else 201 | 202 | # If we're going to rename the final executable, determine the name now. 203 | 204 | if [ x"$transformarg" = x ] 205 | then 206 | dstfile=`basename $dst` 207 | else 208 | dstfile=`basename $dst $transformbasename | 209 | sed $transformarg`$transformbasename 210 | fi 211 | 212 | # don't allow the sed command to completely eliminate the filename 213 | 214 | if [ x"$dstfile" = x ] 215 | then 216 | dstfile=`basename $dst` 217 | else 218 | true 219 | fi 220 | 221 | # Make a temp file name in the proper directory. 222 | 223 | dsttmp=$dstdir/#inst.$$# 224 | 225 | # Move or copy the file name to the temp name 226 | 227 | $doit $instcmd $src $dsttmp && 228 | 229 | trap "rm -f ${dsttmp}" 0 && 230 | 231 | # and set any options; do chmod last to preserve setuid bits 232 | 233 | # If any of these fail, we abort the whole thing. If we want to 234 | # ignore errors from any of these, just make sure not to ignore 235 | # errors from the above "$doit $instcmd $src $dsttmp" command. 236 | 237 | if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && 238 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && 239 | if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && 240 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && 241 | 242 | # Now rename the file to the real destination. 243 | 244 | $doit $rmcmd -f $dstdir/$dstfile && 245 | $doit $mvcmd $dsttmp $dstdir/$dstfile 246 | 247 | fi && 248 | 249 | 250 | exit 0 251 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcapimin.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcapimin.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcapistd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcapistd.c 3 | * 4 | * Copyright (C) 1994-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains application interface code for the compression half 9 | * of the JPEG library. These are the "standard" API routines that are 10 | * used in the normal full-compression case. They are not used by a 11 | * transcoding-only application. Note that if an application links in 12 | * jpeg_start_compress, it will end up linking in the entire compressor. 13 | * We thus must separate this file from jcapimin.c to avoid linking the 14 | * whole compression library into a transcoder. 15 | */ 16 | 17 | #define JPEG_INTERNALS 18 | #include "jinclude.h" 19 | #include "jpeglib.h" 20 | 21 | 22 | /* 23 | * Compression initialization. 24 | * Before calling this, all parameters and a data destination must be set up. 25 | * 26 | * We require a write_all_tables parameter as a failsafe check when writing 27 | * multiple datastreams from the same compression object. Since prior runs 28 | * will have left all the tables marked sent_table=TRUE, a subsequent run 29 | * would emit an abbreviated stream (no tables) by default. This may be what 30 | * is wanted, but for safety's sake it should not be the default behavior: 31 | * programmers should have to make a deliberate choice to emit abbreviated 32 | * images. Therefore the documentation and examples should encourage people 33 | * to pass write_all_tables=TRUE; then it will take active thought to do the 34 | * wrong thing. 35 | */ 36 | 37 | GLOBAL(void) 38 | jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables) 39 | { 40 | if (cinfo->global_state != CSTATE_START) 41 | ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); 42 | 43 | if (write_all_tables) 44 | jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ 45 | 46 | /* (Re)initialize error mgr and destination modules */ 47 | (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); 48 | (*cinfo->dest->init_destination) (cinfo); 49 | /* Perform master selection of active modules */ 50 | jinit_compress_master(cinfo); 51 | /* Set up for the first pass */ 52 | (*cinfo->master->prepare_for_pass) (cinfo); 53 | /* Ready for application to drive first pass through jpeg_write_scanlines 54 | * or jpeg_write_raw_data. 55 | */ 56 | cinfo->next_scanline = 0; 57 | cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); 58 | } 59 | 60 | 61 | /* 62 | * Write some scanlines of data to the JPEG compressor. 63 | * 64 | * The return value will be the number of lines actually written. 65 | * This should be less than the supplied num_lines only in case that 66 | * the data destination module has requested suspension of the compressor, 67 | * or if more than image_height scanlines are passed in. 68 | * 69 | * Note: we warn about excess calls to jpeg_write_scanlines() since 70 | * this likely signals an application programmer error. However, 71 | * excess scanlines passed in the last valid call are *silently* ignored, 72 | * so that the application need not adjust num_lines for end-of-image 73 | * when using a multiple-scanline buffer. 74 | */ 75 | 76 | GLOBAL(JDIMENSION) 77 | jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, 78 | JDIMENSION num_lines) 79 | { 80 | JDIMENSION row_ctr, rows_left; 81 | 82 | if (cinfo->global_state != CSTATE_SCANNING) 83 | ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); 84 | if (cinfo->next_scanline >= cinfo->image_height) 85 | WARNMS(cinfo, JWRN_TOO_MUCH_DATA); 86 | 87 | /* Call progress monitor hook if present */ 88 | if (cinfo->progress != NULL) { 89 | cinfo->progress->pass_counter = (long) cinfo->next_scanline; 90 | cinfo->progress->pass_limit = (long) cinfo->image_height; 91 | (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); 92 | } 93 | 94 | /* Give master control module another chance if this is first call to 95 | * jpeg_write_scanlines. This lets output of the frame/scan headers be 96 | * delayed so that application can write COM, etc, markers between 97 | * jpeg_start_compress and jpeg_write_scanlines. 98 | */ 99 | if (cinfo->master->call_pass_startup) 100 | (*cinfo->master->pass_startup) (cinfo); 101 | 102 | /* Ignore any extra scanlines at bottom of image. */ 103 | rows_left = cinfo->image_height - cinfo->next_scanline; 104 | if (num_lines > rows_left) 105 | num_lines = rows_left; 106 | 107 | row_ctr = 0; 108 | (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines); 109 | cinfo->next_scanline += row_ctr; 110 | return row_ctr; 111 | } 112 | 113 | 114 | /* 115 | * Alternate entry point to write raw data. 116 | * Processes exactly one iMCU row per call, unless suspended. 117 | */ 118 | 119 | GLOBAL(JDIMENSION) 120 | jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, 121 | JDIMENSION num_lines) 122 | { 123 | JDIMENSION lines_per_iMCU_row; 124 | 125 | if (cinfo->global_state != CSTATE_RAW_OK) 126 | ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); 127 | if (cinfo->next_scanline >= cinfo->image_height) { 128 | WARNMS(cinfo, JWRN_TOO_MUCH_DATA); 129 | return 0; 130 | } 131 | 132 | /* Call progress monitor hook if present */ 133 | if (cinfo->progress != NULL) { 134 | cinfo->progress->pass_counter = (long) cinfo->next_scanline; 135 | cinfo->progress->pass_limit = (long) cinfo->image_height; 136 | (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); 137 | } 138 | 139 | /* Give master control module another chance if this is first call to 140 | * jpeg_write_raw_data. This lets output of the frame/scan headers be 141 | * delayed so that application can write COM, etc, markers between 142 | * jpeg_start_compress and jpeg_write_raw_data. 143 | */ 144 | if (cinfo->master->call_pass_startup) 145 | (*cinfo->master->pass_startup) (cinfo); 146 | 147 | /* Verify that at least one iMCU row has been passed. */ 148 | lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE; 149 | if (num_lines < lines_per_iMCU_row) 150 | ERREXIT(cinfo, JERR_BUFFER_SIZE); 151 | 152 | /* Directly compress the row. */ 153 | if (! (*cinfo->coef->compress_data) (cinfo, data)) { 154 | /* If compressor did not consume the whole row, suspend processing. */ 155 | return 0; 156 | } 157 | 158 | /* OK, we processed one iMCU row. */ 159 | cinfo->next_scanline += lines_per_iMCU_row; 160 | return lines_per_iMCU_row; 161 | } 162 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcapistd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcapistd.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jccoefct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jccoefct.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jccolor.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jccolor.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcdctmgr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcdctmgr.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jchuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jchuff.h 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains declarations for Huffman entropy encoding routines 9 | * that are shared between the sequential encoder (jchuff.c) and the 10 | * progressive encoder (jcphuff.c). No other modules need to see these. 11 | */ 12 | 13 | /* The legal range of a DCT coefficient is 14 | * -1024 .. +1023 for 8-bit data; 15 | * -16384 .. +16383 for 12-bit data. 16 | * Hence the magnitude should always fit in 10 or 14 bits respectively. 17 | */ 18 | 19 | #if BITS_IN_JSAMPLE == 8 20 | #define MAX_COEF_BITS 10 21 | #else 22 | #define MAX_COEF_BITS 14 23 | #endif 24 | 25 | /* Derived data constructed for each Huffman table */ 26 | 27 | typedef struct { 28 | unsigned int ehufco[256]; /* code for each symbol */ 29 | char ehufsi[256]; /* length of code for each symbol */ 30 | /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ 31 | } c_derived_tbl; 32 | 33 | /* Short forms of external names for systems with brain-damaged linkers. */ 34 | 35 | #ifdef NEED_SHORT_EXTERNAL_NAMES 36 | #define jpeg_make_c_derived_tbl jMkCDerived 37 | #define jpeg_gen_optimal_table jGenOptTbl 38 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 39 | 40 | /* Expand a Huffman table definition into the derived format */ 41 | EXTERN(void) jpeg_make_c_derived_tbl 42 | JPP((j_compress_ptr cinfo, boolean isDC, int tblno, 43 | c_derived_tbl ** pdtbl)); 44 | 45 | /* Generate an optimal table definition given the specified counts */ 46 | EXTERN(void) jpeg_gen_optimal_table 47 | JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); 48 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jchuff.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jchuff.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcinit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcinit.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains initialization logic for the JPEG compressor. 9 | * This routine is in charge of selecting the modules to be executed and 10 | * making an initialization call to each one. 11 | * 12 | * Logically, this code belongs in jcmaster.c. It's split out because 13 | * linking this routine implies linking the entire compression library. 14 | * For a transcoding-only application, we want to be able to use jcmaster.c 15 | * without linking in the whole library. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | 22 | 23 | /* 24 | * Master selection of compression modules. 25 | * This is done once at the start of processing an image. We determine 26 | * which modules will be used and give them appropriate initialization calls. 27 | */ 28 | 29 | GLOBAL(void) 30 | jinit_compress_master (j_compress_ptr cinfo) 31 | { 32 | /* Initialize master control (includes parameter checking/processing) */ 33 | jinit_c_master_control(cinfo, FALSE /* full compression */); 34 | 35 | /* Preprocessing */ 36 | if (! cinfo->raw_data_in) { 37 | jinit_color_converter(cinfo); 38 | jinit_downsampler(cinfo); 39 | jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); 40 | } 41 | /* Forward DCT */ 42 | jinit_forward_dct(cinfo); 43 | /* Entropy encoding: either Huffman or arithmetic coding. */ 44 | if (cinfo->arith_code) { 45 | ERREXIT(cinfo, JERR_ARITH_NOTIMPL); 46 | } else { 47 | if (cinfo->progressive_mode) { 48 | #ifdef C_PROGRESSIVE_SUPPORTED 49 | jinit_phuff_encoder(cinfo); 50 | #else 51 | ERREXIT(cinfo, JERR_NOT_COMPILED); 52 | #endif 53 | } else 54 | jinit_huff_encoder(cinfo); 55 | } 56 | 57 | /* Need a full-image coefficient buffer in any multi-pass mode. */ 58 | jinit_c_coef_controller(cinfo, 59 | (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); 60 | jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); 61 | 62 | jinit_marker_writer(cinfo); 63 | 64 | /* We can now tell the memory manager to allocate virtual arrays. */ 65 | (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); 66 | 67 | /* Write the datastream header (SOI) immediately. 68 | * Frame and scan headers are postponed till later. 69 | * This lets application insert special markers after the SOI. 70 | */ 71 | (*cinfo->marker->write_file_header) (cinfo); 72 | } 73 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcinit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcinit.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcmainct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcmainct.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcmarker.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcmarker.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcmaster.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcmaster.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcomapi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcomapi.c 3 | * 4 | * Copyright (C) 1994-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains application interface routines that are used for both 9 | * compression and decompression. 10 | */ 11 | 12 | #define JPEG_INTERNALS 13 | #include "jinclude.h" 14 | #include "jpeglib.h" 15 | 16 | 17 | /* 18 | * Abort processing of a JPEG compression or decompression operation, 19 | * but don't destroy the object itself. 20 | * 21 | * For this, we merely clean up all the nonpermanent memory pools. 22 | * Note that temp files (virtual arrays) are not allowed to belong to 23 | * the permanent pool, so we will be able to close all temp files here. 24 | * Closing a data source or destination, if necessary, is the application's 25 | * responsibility. 26 | */ 27 | 28 | GLOBAL(void) 29 | jpeg_abort (j_common_ptr cinfo) 30 | { 31 | int pool; 32 | 33 | /* Do nothing if called on a not-initialized or destroyed JPEG object. */ 34 | if (cinfo->mem == NULL) 35 | return; 36 | 37 | /* Releasing pools in reverse order might help avoid fragmentation 38 | * with some (brain-damaged) malloc libraries. 39 | */ 40 | for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { 41 | (*cinfo->mem->free_pool) (cinfo, pool); 42 | } 43 | 44 | /* Reset overall state for possible reuse of object */ 45 | if (cinfo->is_decompressor) { 46 | cinfo->global_state = DSTATE_START; 47 | /* Try to keep application from accessing now-deleted marker list. 48 | * A bit kludgy to do it here, but this is the most central place. 49 | */ 50 | ((j_decompress_ptr) cinfo)->marker_list = NULL; 51 | } else { 52 | cinfo->global_state = CSTATE_START; 53 | } 54 | } 55 | 56 | 57 | /* 58 | * Destruction of a JPEG object. 59 | * 60 | * Everything gets deallocated except the master jpeg_compress_struct itself 61 | * and the error manager struct. Both of these are supplied by the application 62 | * and must be freed, if necessary, by the application. (Often they are on 63 | * the stack and so don't need to be freed anyway.) 64 | * Closing a data source or destination, if necessary, is the application's 65 | * responsibility. 66 | */ 67 | 68 | GLOBAL(void) 69 | jpeg_destroy (j_common_ptr cinfo) 70 | { 71 | /* We need only tell the memory manager to release everything. */ 72 | /* NB: mem pointer is NULL if memory mgr failed to initialize. */ 73 | if (cinfo->mem != NULL) 74 | (*cinfo->mem->self_destruct) (cinfo); 75 | cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ 76 | cinfo->global_state = 0; /* mark it destroyed */ 77 | } 78 | 79 | 80 | /* 81 | * Convenience routines for allocating quantization and Huffman tables. 82 | * (Would jutils.c be a more reasonable place to put these?) 83 | */ 84 | 85 | GLOBAL(JQUANT_TBL *) 86 | jpeg_alloc_quant_table (j_common_ptr cinfo) 87 | { 88 | JQUANT_TBL *tbl; 89 | 90 | tbl = (JQUANT_TBL *) 91 | (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); 92 | tbl->sent_table = FALSE; /* make sure this is false in any new table */ 93 | return tbl; 94 | } 95 | 96 | 97 | GLOBAL(JHUFF_TBL *) 98 | jpeg_alloc_huff_table (j_common_ptr cinfo) 99 | { 100 | JHUFF_TBL *tbl; 101 | 102 | tbl = (JHUFF_TBL *) 103 | (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); 104 | tbl->sent_table = FALSE; /* make sure this is false in any new table */ 105 | return tbl; 106 | } 107 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcomapi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcomapi.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.bcc: -------------------------------------------------------------------------------- 1 | /* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #ifdef __MSDOS__ 15 | #define NEED_FAR_POINTERS /* for small or medium memory model */ 16 | #endif 17 | #undef NEED_SHORT_EXTERNAL_NAMES 18 | #undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */ 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | 24 | #ifdef __MSDOS__ 25 | #define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ 26 | #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ 27 | #define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */ 28 | #endif 29 | 30 | #endif /* JPEG_INTERNALS */ 31 | 32 | #ifdef JPEG_CJPEG_DJPEG 33 | 34 | #define BMP_SUPPORTED /* BMP image file format */ 35 | #define GIF_SUPPORTED /* GIF image file format */ 36 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 37 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 38 | #define TARGA_SUPPORTED /* Targa image file format */ 39 | 40 | #define TWO_FILE_COMMANDLINE 41 | #define USE_SETMODE /* Borland has setmode() */ 42 | #ifdef __MSDOS__ 43 | #define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ 44 | #endif 45 | #undef DONT_USE_B_MODE 46 | #undef PROGRESS_REPORT /* optional */ 47 | 48 | #endif /* JPEG_CJPEG_DJPEG */ 49 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.cfg: -------------------------------------------------------------------------------- 1 | /* jconfig.cfg --- source file edited by configure script */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #undef HAVE_PROTOTYPES 5 | #undef HAVE_UNSIGNED_CHAR 6 | #undef HAVE_UNSIGNED_SHORT 7 | #undef void 8 | #undef const 9 | #undef CHAR_IS_UNSIGNED 10 | #undef HAVE_STDDEF_H 11 | #undef HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | /* Define this if you get warnings about undefined structures. */ 17 | #undef INCOMPLETE_TYPES_BROKEN 18 | 19 | #ifdef JPEG_INTERNALS 20 | 21 | #undef RIGHT_SHIFT_IS_UNSIGNED 22 | #undef INLINE 23 | /* These are for configuring the JPEG memory manager. */ 24 | #undef DEFAULT_MAX_MEM 25 | #undef NO_MKTEMP 26 | 27 | #endif /* JPEG_INTERNALS */ 28 | 29 | #ifdef JPEG_CJPEG_DJPEG 30 | 31 | #define BMP_SUPPORTED /* BMP image file format */ 32 | #define GIF_SUPPORTED /* GIF image file format */ 33 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 34 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 35 | #define TARGA_SUPPORTED /* Targa image file format */ 36 | 37 | #undef TWO_FILE_COMMANDLINE 38 | #undef NEED_SIGNAL_CATCHER 39 | #undef DONT_USE_B_MODE 40 | 41 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 42 | #undef PROGRESS_REPORT 43 | 44 | #endif /* JPEG_CJPEG_DJPEG */ 45 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.dj: -------------------------------------------------------------------------------- 1 | /* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #undef TWO_FILE_COMMANDLINE /* optional */ 33 | #define USE_SETMODE /* Needed to make one-file style work in DJGPP */ 34 | #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ 35 | #undef DONT_USE_B_MODE 36 | #undef PROGRESS_REPORT /* optional */ 37 | 38 | #endif /* JPEG_CJPEG_DJPEG */ 39 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.doc: -------------------------------------------------------------------------------- 1 | /* 2 | * jconfig.doc 3 | * 4 | * Copyright (C) 1991-1994, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file documents the configuration options that are required to 9 | * customize the JPEG software for a particular system. 10 | * 11 | * The actual configuration options for a particular installation are stored 12 | * in jconfig.h. On many machines, jconfig.h can be generated automatically 13 | * or copied from one of the "canned" jconfig files that we supply. But if 14 | * you need to generate a jconfig.h file by hand, this file tells you how. 15 | * 16 | * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. 17 | * EDIT A COPY NAMED JCONFIG.H. 18 | */ 19 | 20 | 21 | /* 22 | * These symbols indicate the properties of your machine or compiler. 23 | * #define the symbol if yes, #undef it if no. 24 | */ 25 | 26 | /* Does your compiler support function prototypes? 27 | * (If not, you also need to use ansi2knr, see install.doc) 28 | */ 29 | #define HAVE_PROTOTYPES 30 | 31 | /* Does your compiler support the declaration "unsigned char" ? 32 | * How about "unsigned short" ? 33 | */ 34 | #define HAVE_UNSIGNED_CHAR 35 | #define HAVE_UNSIGNED_SHORT 36 | 37 | /* Define "void" as "char" if your compiler doesn't know about type void. 38 | * NOTE: be sure to define void such that "void *" represents the most general 39 | * pointer type, e.g., that returned by malloc(). 40 | */ 41 | /* #define void char */ 42 | 43 | /* Define "const" as empty if your compiler doesn't know the "const" keyword. 44 | */ 45 | /* #define const */ 46 | 47 | /* Define this if an ordinary "char" type is unsigned. 48 | * If you're not sure, leaving it undefined will work at some cost in speed. 49 | * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. 50 | */ 51 | #undef CHAR_IS_UNSIGNED 52 | 53 | /* Define this if your system has an ANSI-conforming file. 54 | */ 55 | #define HAVE_STDDEF_H 56 | 57 | /* Define this if your system has an ANSI-conforming file. 58 | */ 59 | #define HAVE_STDLIB_H 60 | 61 | /* Define this if your system does not have an ANSI/SysV , 62 | * but does have a BSD-style . 63 | */ 64 | #undef NEED_BSD_STRINGS 65 | 66 | /* Define this if your system does not provide typedef size_t in any of the 67 | * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in 68 | * instead. 69 | */ 70 | #undef NEED_SYS_TYPES_H 71 | 72 | /* For 80x86 machines, you need to define NEED_FAR_POINTERS, 73 | * unless you are using a large-data memory model or 80386 flat-memory mode. 74 | * On less brain-damaged CPUs this symbol must not be defined. 75 | * (Defining this symbol causes large data structures to be referenced through 76 | * "far" pointers and to be allocated with a special version of malloc.) 77 | */ 78 | #undef NEED_FAR_POINTERS 79 | 80 | /* Define this if your linker needs global names to be unique in less 81 | * than the first 15 characters. 82 | */ 83 | #undef NEED_SHORT_EXTERNAL_NAMES 84 | 85 | /* Although a real ANSI C compiler can deal perfectly well with pointers to 86 | * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI 87 | * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, 88 | * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you 89 | * actually get "missing structure definition" warnings or errors while 90 | * compiling the JPEG code. 91 | */ 92 | #undef INCOMPLETE_TYPES_BROKEN 93 | 94 | 95 | /* 96 | * The following options affect code selection within the JPEG library, 97 | * but they don't need to be visible to applications using the library. 98 | * To minimize application namespace pollution, the symbols won't be 99 | * defined unless JPEG_INTERNALS has been defined. 100 | */ 101 | 102 | #ifdef JPEG_INTERNALS 103 | 104 | /* Define this if your compiler implements ">>" on signed values as a logical 105 | * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, 106 | * which is the normal and rational definition. 107 | */ 108 | #undef RIGHT_SHIFT_IS_UNSIGNED 109 | 110 | 111 | #endif /* JPEG_INTERNALS */ 112 | 113 | 114 | /* 115 | * The remaining options do not affect the JPEG library proper, 116 | * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). 117 | * Other applications can ignore these. 118 | */ 119 | 120 | #ifdef JPEG_CJPEG_DJPEG 121 | 122 | /* These defines indicate which image (non-JPEG) file formats are allowed. */ 123 | 124 | #define BMP_SUPPORTED /* BMP image file format */ 125 | #define GIF_SUPPORTED /* GIF image file format */ 126 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 127 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 128 | #define TARGA_SUPPORTED /* Targa image file format */ 129 | 130 | /* Define this if you want to name both input and output files on the command 131 | * line, rather than using stdout and optionally stdin. You MUST do this if 132 | * your system can't cope with binary I/O to stdin/stdout. See comments at 133 | * head of cjpeg.c or djpeg.c. 134 | */ 135 | #undef TWO_FILE_COMMANDLINE 136 | 137 | /* Define this if your system needs explicit cleanup of temporary files. 138 | * This is crucial under MS-DOS, where the temporary "files" may be areas 139 | * of extended memory; on most other systems it's not as important. 140 | */ 141 | #undef NEED_SIGNAL_CATCHER 142 | 143 | /* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). 144 | * This is necessary on systems that distinguish text files from binary files, 145 | * and is harmless on most systems that don't. If you have one of the rare 146 | * systems that complains about the "b" spec, define this symbol. 147 | */ 148 | #undef DONT_USE_B_MODE 149 | 150 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. 151 | */ 152 | #undef PROGRESS_REPORT 153 | 154 | 155 | #endif /* JPEG_CJPEG_DJPEG */ 156 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.h. Generated automatically by configure. */ 2 | /* jconfig.cfg --- source file edited by configure script */ 3 | /* see jconfig.doc for explanations */ 4 | 5 | #define HAVE_PROTOTYPES 6 | #define HAVE_UNSIGNED_CHAR 7 | #define HAVE_UNSIGNED_SHORT 8 | #undef void 9 | #undef const 10 | #undef CHAR_IS_UNSIGNED 11 | #define HAVE_STDDEF_H 12 | #define HAVE_STDLIB_H 13 | #undef NEED_BSD_STRINGS 14 | #undef NEED_SYS_TYPES_H 15 | #undef NEED_FAR_POINTERS 16 | #undef NEED_SHORT_EXTERNAL_NAMES 17 | /* Define this if you get warnings about undefined structures. */ 18 | #undef INCOMPLETE_TYPES_BROKEN 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | #define INLINE __inline__ 24 | /* These are for configuring the JPEG memory manager. */ 25 | #undef DEFAULT_MAX_MEM 26 | #undef NO_MKTEMP 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | 30 | #ifdef JPEG_CJPEG_DJPEG 31 | 32 | #define BMP_SUPPORTED /* BMP image file format */ 33 | #define GIF_SUPPORTED /* GIF image file format */ 34 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 35 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 36 | #define TARGA_SUPPORTED /* Targa image file format */ 37 | 38 | #undef TWO_FILE_COMMANDLINE 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | 42 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 43 | #undef PROGRESS_REPORT 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.mac: -------------------------------------------------------------------------------- 1 | /* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */ 23 | 24 | #define ALIGN_TYPE long /* Needed for 680x0 Macs */ 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #define USE_CCOMMAND /* Command line reader for Macintosh */ 37 | #define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */ 38 | 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | #undef PROGRESS_REPORT /* optional */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.manx: -------------------------------------------------------------------------------- 1 | /* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ 23 | 24 | #define SHORTxSHORT_32 /* produces better DCT code with Aztec C */ 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #define TWO_FILE_COMMANDLINE 37 | #define NEED_SIGNAL_CATCHER 38 | #undef DONT_USE_B_MODE 39 | #undef PROGRESS_REPORT /* optional */ 40 | 41 | #define signal_catcher _abort /* hack for Aztec C naming requirements */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.mc6: -------------------------------------------------------------------------------- 1 | /* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #define NEED_FAR_POINTERS /* for small or medium memory model */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ 23 | 24 | #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ 25 | 26 | #define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ 27 | 28 | #define NEED_FHEAPMIN /* far heap management routines are broken */ 29 | 30 | #define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ 31 | /* Note: the above define is known to improve the code with Microsoft C 6.00A. 32 | * I do not know whether it is good for later compiler versions. 33 | * Please report any info on this point to jpeg-info@uunet.uu.net. 34 | */ 35 | 36 | #endif /* JPEG_INTERNALS */ 37 | 38 | #ifdef JPEG_CJPEG_DJPEG 39 | 40 | #define BMP_SUPPORTED /* BMP image file format */ 41 | #define GIF_SUPPORTED /* GIF image file format */ 42 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 43 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 44 | #define TARGA_SUPPORTED /* Targa image file format */ 45 | 46 | #define TWO_FILE_COMMANDLINE 47 | #define USE_SETMODE /* Microsoft has setmode() */ 48 | #define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ 49 | #undef DONT_USE_B_MODE 50 | #undef PROGRESS_REPORT /* optional */ 51 | 52 | #endif /* JPEG_CJPEG_DJPEG */ 53 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.sas: -------------------------------------------------------------------------------- 1 | /* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ 23 | 24 | #define NO_MKTEMP /* SAS C doesn't have mktemp() */ 25 | 26 | #define SHORTxSHORT_32 /* produces better DCT code with SAS C */ 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | 30 | #ifdef JPEG_CJPEG_DJPEG 31 | 32 | #define BMP_SUPPORTED /* BMP image file format */ 33 | #define GIF_SUPPORTED /* GIF image file format */ 34 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 35 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 36 | #define TARGA_SUPPORTED /* Targa image file format */ 37 | 38 | #define TWO_FILE_COMMANDLINE 39 | #define NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | #undef PROGRESS_REPORT /* optional */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.st: -------------------------------------------------------------------------------- 1 | /* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */ 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define ALIGN_TYPE long /* apparently double is a weird size? */ 23 | 24 | #endif /* JPEG_INTERNALS */ 25 | 26 | #ifdef JPEG_CJPEG_DJPEG 27 | 28 | #define BMP_SUPPORTED /* BMP image file format */ 29 | #define GIF_SUPPORTED /* GIF image file format */ 30 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 31 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 32 | #define TARGA_SUPPORTED /* Targa image file format */ 33 | 34 | #define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */ 35 | /* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define 36 | * USE_SETMODE. Some Atari compilers require it, some do not. 37 | */ 38 | #define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */ 39 | #undef DONT_USE_B_MODE 40 | #undef PROGRESS_REPORT /* optional */ 41 | 42 | #endif /* JPEG_CJPEG_DJPEG */ 43 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.vc: -------------------------------------------------------------------------------- 1 | /* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | /* Define "boolean" as unsigned char, not int, per Windows custom */ 19 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ 20 | typedef unsigned char boolean; 21 | #endif 22 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ 23 | 24 | 25 | #ifdef JPEG_INTERNALS 26 | 27 | #undef RIGHT_SHIFT_IS_UNSIGNED 28 | 29 | #endif /* JPEG_INTERNALS */ 30 | 31 | #ifdef JPEG_CJPEG_DJPEG 32 | 33 | #define BMP_SUPPORTED /* BMP image file format */ 34 | #define GIF_SUPPORTED /* GIF image file format */ 35 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 36 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 37 | #define TARGA_SUPPORTED /* Targa image file format */ 38 | 39 | #define TWO_FILE_COMMANDLINE /* optional */ 40 | #define USE_SETMODE /* Microsoft has setmode() */ 41 | #undef NEED_SIGNAL_CATCHER 42 | #undef DONT_USE_B_MODE 43 | #undef PROGRESS_REPORT /* optional */ 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.vms: -------------------------------------------------------------------------------- 1 | /* jconfig.vms --- jconfig.h for use on Digital VMS. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #define TWO_FILE_COMMANDLINE /* Needed on VMS */ 33 | #undef NEED_SIGNAL_CATCHER 34 | #undef DONT_USE_B_MODE 35 | #undef PROGRESS_REPORT /* optional */ 36 | 37 | #endif /* JPEG_CJPEG_DJPEG */ 38 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jconfig.wat: -------------------------------------------------------------------------------- 1 | /* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #define CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #undef TWO_FILE_COMMANDLINE /* optional */ 33 | #define USE_SETMODE /* Needed to make one-file style work in Watcom */ 34 | #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ 35 | #undef DONT_USE_B_MODE 36 | #undef PROGRESS_REPORT /* optional */ 37 | 38 | #endif /* JPEG_CJPEG_DJPEG */ 39 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcparam.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcparam.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcphuff.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcphuff.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcprepct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcprepct.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jcsample.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jcsample.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jctrans.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jctrans.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdapimin.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdapimin.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdapistd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdapistd.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdatadst.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jdatadst.c 3 | * 4 | * Copyright (C) 1994-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains compression data destination routines for the case of 9 | * emitting JPEG data to a file (or any stdio stream). While these routines 10 | * are sufficient for most applications, some will want to use a different 11 | * destination manager. 12 | * IMPORTANT: we assume that fwrite() will correctly transcribe an array of 13 | * JOCTETs into 8-bit-wide elements on external storage. If char is wider 14 | * than 8 bits on your machine, you may need to do some tweaking. 15 | */ 16 | 17 | /* this is not a core library module, so it doesn't define JPEG_INTERNALS */ 18 | #include "jinclude.h" 19 | #include "jpeglib.h" 20 | #include "jerror.h" 21 | 22 | 23 | /* Expanded data destination object for stdio output */ 24 | 25 | typedef struct { 26 | struct jpeg_destination_mgr pub; /* public fields */ 27 | 28 | FILE * outfile; /* target stream */ 29 | JOCTET * buffer; /* start of buffer */ 30 | } my_destination_mgr; 31 | 32 | typedef my_destination_mgr * my_dest_ptr; 33 | 34 | #define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ 35 | 36 | 37 | /* 38 | * Initialize destination --- called by jpeg_start_compress 39 | * before any data is actually written. 40 | */ 41 | 42 | METHODDEF(void) 43 | init_destination (j_compress_ptr cinfo) 44 | { 45 | my_dest_ptr dest = (my_dest_ptr) cinfo->dest; 46 | 47 | /* Allocate the output buffer --- it will be released when done with image */ 48 | dest->buffer = (JOCTET *) 49 | (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, 50 | OUTPUT_BUF_SIZE * SIZEOF(JOCTET)); 51 | 52 | dest->pub.next_output_byte = dest->buffer; 53 | dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; 54 | } 55 | 56 | 57 | /* 58 | * Empty the output buffer --- called whenever buffer fills up. 59 | * 60 | * In typical applications, this should write the entire output buffer 61 | * (ignoring the current state of next_output_byte & free_in_buffer), 62 | * reset the pointer & count to the start of the buffer, and return TRUE 63 | * indicating that the buffer has been dumped. 64 | * 65 | * In applications that need to be able to suspend compression due to output 66 | * overrun, a FALSE return indicates that the buffer cannot be emptied now. 67 | * In this situation, the compressor will return to its caller (possibly with 68 | * an indication that it has not accepted all the supplied scanlines). The 69 | * application should resume compression after it has made more room in the 70 | * output buffer. Note that there are substantial restrictions on the use of 71 | * suspension --- see the documentation. 72 | * 73 | * When suspending, the compressor will back up to a convenient restart point 74 | * (typically the start of the current MCU). next_output_byte & free_in_buffer 75 | * indicate where the restart point will be if the current call returns FALSE. 76 | * Data beyond this point will be regenerated after resumption, so do not 77 | * write it out when emptying the buffer externally. 78 | */ 79 | 80 | METHODDEF(boolean) 81 | empty_output_buffer (j_compress_ptr cinfo) 82 | { 83 | my_dest_ptr dest = (my_dest_ptr) cinfo->dest; 84 | 85 | if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != 86 | (size_t) OUTPUT_BUF_SIZE) 87 | ERREXIT(cinfo, JERR_FILE_WRITE); 88 | 89 | dest->pub.next_output_byte = dest->buffer; 90 | dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; 91 | 92 | return TRUE; 93 | } 94 | 95 | 96 | /* 97 | * Terminate destination --- called by jpeg_finish_compress 98 | * after all data has been written. Usually needs to flush buffer. 99 | * 100 | * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding 101 | * application must deal with any cleanup that should happen even 102 | * for error exit. 103 | */ 104 | 105 | METHODDEF(void) 106 | term_destination (j_compress_ptr cinfo) 107 | { 108 | my_dest_ptr dest = (my_dest_ptr) cinfo->dest; 109 | size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; 110 | 111 | /* Write any data remaining in the buffer */ 112 | if (datacount > 0) { 113 | if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) 114 | ERREXIT(cinfo, JERR_FILE_WRITE); 115 | } 116 | fflush(dest->outfile); 117 | /* Make sure we wrote the output file OK */ 118 | if (ferror(dest->outfile)) 119 | ERREXIT(cinfo, JERR_FILE_WRITE); 120 | } 121 | 122 | 123 | /* 124 | * Prepare for output to a stdio stream. 125 | * The caller must have already opened the stream, and is responsible 126 | * for closing it after finishing compression. 127 | */ 128 | 129 | GLOBAL(void) 130 | jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) 131 | { 132 | my_dest_ptr dest; 133 | 134 | /* The destination object is made permanent so that multiple JPEG images 135 | * can be written to the same file without re-executing jpeg_stdio_dest. 136 | * This makes it dangerous to use this manager and a different destination 137 | * manager serially with the same JPEG object, because their private object 138 | * sizes may be different. Caveat programmer. 139 | */ 140 | if (cinfo->dest == NULL) { /* first time for this JPEG object? */ 141 | cinfo->dest = (struct jpeg_destination_mgr *) 142 | (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, 143 | SIZEOF(my_destination_mgr)); 144 | } 145 | 146 | dest = (my_dest_ptr) cinfo->dest; 147 | dest->pub.init_destination = init_destination; 148 | dest->pub.empty_output_buffer = empty_output_buffer; 149 | dest->pub.term_destination = term_destination; 150 | dest->outfile = outfile; 151 | } 152 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdatadst.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdatadst.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdatasrc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jdatasrc.c 3 | * 4 | * Copyright (C) 1994-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains decompression data source routines for the case of 9 | * reading JPEG data from a file (or any stdio stream). While these routines 10 | * are sufficient for most applications, some will want to use a different 11 | * source manager. 12 | * IMPORTANT: we assume that fread() will correctly transcribe an array of 13 | * JOCTETs from 8-bit-wide elements on external storage. If char is wider 14 | * than 8 bits on your machine, you may need to do some tweaking. 15 | */ 16 | 17 | /* this is not a core library module, so it doesn't define JPEG_INTERNALS */ 18 | #include "jinclude.h" 19 | #include "jpeglib.h" 20 | #include "jerror.h" 21 | 22 | 23 | /* Expanded data source object for stdio input */ 24 | 25 | typedef struct { 26 | struct jpeg_source_mgr pub; /* public fields */ 27 | 28 | FILE * infile; /* source stream */ 29 | JOCTET * buffer; /* start of buffer */ 30 | boolean start_of_file; /* have we gotten any data yet? */ 31 | } my_source_mgr; 32 | 33 | typedef my_source_mgr * my_src_ptr; 34 | 35 | #define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ 36 | 37 | 38 | /* 39 | * Initialize source --- called by jpeg_read_header 40 | * before any data is actually read. 41 | */ 42 | 43 | METHODDEF(void) 44 | init_source (j_decompress_ptr cinfo) 45 | { 46 | my_src_ptr src = (my_src_ptr) cinfo->src; 47 | 48 | /* We reset the empty-input-file flag for each image, 49 | * but we don't clear the input buffer. 50 | * This is correct behavior for reading a series of images from one source. 51 | */ 52 | src->start_of_file = TRUE; 53 | } 54 | 55 | 56 | /* 57 | * Fill the input buffer --- called whenever buffer is emptied. 58 | * 59 | * In typical applications, this should read fresh data into the buffer 60 | * (ignoring the current state of next_input_byte & bytes_in_buffer), 61 | * reset the pointer & count to the start of the buffer, and return TRUE 62 | * indicating that the buffer has been reloaded. It is not necessary to 63 | * fill the buffer entirely, only to obtain at least one more byte. 64 | * 65 | * There is no such thing as an EOF return. If the end of the file has been 66 | * reached, the routine has a choice of ERREXIT() or inserting fake data into 67 | * the buffer. In most cases, generating a warning message and inserting a 68 | * fake EOI marker is the best course of action --- this will allow the 69 | * decompressor to output however much of the image is there. However, 70 | * the resulting error message is misleading if the real problem is an empty 71 | * input file, so we handle that case specially. 72 | * 73 | * In applications that need to be able to suspend compression due to input 74 | * not being available yet, a FALSE return indicates that no more data can be 75 | * obtained right now, but more may be forthcoming later. In this situation, 76 | * the decompressor will return to its caller (with an indication of the 77 | * number of scanlines it has read, if any). The application should resume 78 | * decompression after it has loaded more data into the input buffer. Note 79 | * that there are substantial restrictions on the use of suspension --- see 80 | * the documentation. 81 | * 82 | * When suspending, the decompressor will back up to a convenient restart point 83 | * (typically the start of the current MCU). next_input_byte & bytes_in_buffer 84 | * indicate where the restart point will be if the current call returns FALSE. 85 | * Data beyond this point must be rescanned after resumption, so move it to 86 | * the front of the buffer rather than discarding it. 87 | */ 88 | 89 | METHODDEF(boolean) 90 | fill_input_buffer (j_decompress_ptr cinfo) 91 | { 92 | my_src_ptr src = (my_src_ptr) cinfo->src; 93 | size_t nbytes; 94 | 95 | nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE); 96 | 97 | if (nbytes <= 0) { 98 | if (src->start_of_file) /* Treat empty input file as fatal error */ 99 | ERREXIT(cinfo, JERR_INPUT_EMPTY); 100 | WARNMS(cinfo, JWRN_JPEG_EOF); 101 | /* Insert a fake EOI marker */ 102 | src->buffer[0] = (JOCTET) 0xFF; 103 | src->buffer[1] = (JOCTET) JPEG_EOI; 104 | nbytes = 2; 105 | } 106 | 107 | src->pub.next_input_byte = src->buffer; 108 | src->pub.bytes_in_buffer = nbytes; 109 | src->start_of_file = FALSE; 110 | 111 | return TRUE; 112 | } 113 | 114 | 115 | /* 116 | * Skip data --- used to skip over a potentially large amount of 117 | * uninteresting data (such as an APPn marker). 118 | * 119 | * Writers of suspendable-input applications must note that skip_input_data 120 | * is not granted the right to give a suspension return. If the skip extends 121 | * beyond the data currently in the buffer, the buffer can be marked empty so 122 | * that the next read will cause a fill_input_buffer call that can suspend. 123 | * Arranging for additional bytes to be discarded before reloading the input 124 | * buffer is the application writer's problem. 125 | */ 126 | 127 | METHODDEF(void) 128 | skip_input_data (j_decompress_ptr cinfo, long num_bytes) 129 | { 130 | my_src_ptr src = (my_src_ptr) cinfo->src; 131 | 132 | /* Just a dumb implementation for now. Could use fseek() except 133 | * it doesn't work on pipes. Not clear that being smart is worth 134 | * any trouble anyway --- large skips are infrequent. 135 | */ 136 | if (num_bytes > 0) { 137 | while (num_bytes > (long) src->pub.bytes_in_buffer) { 138 | num_bytes -= (long) src->pub.bytes_in_buffer; 139 | (void) fill_input_buffer(cinfo); 140 | /* note we assume that fill_input_buffer will never return FALSE, 141 | * so suspension need not be handled. 142 | */ 143 | } 144 | src->pub.next_input_byte += (size_t) num_bytes; 145 | src->pub.bytes_in_buffer -= (size_t) num_bytes; 146 | } 147 | } 148 | 149 | 150 | /* 151 | * An additional method that can be provided by data source modules is the 152 | * resync_to_restart method for error recovery in the presence of RST markers. 153 | * For the moment, this source module just uses the default resync method 154 | * provided by the JPEG library. That method assumes that no backtracking 155 | * is possible. 156 | */ 157 | 158 | 159 | /* 160 | * Terminate source --- called by jpeg_finish_decompress 161 | * after all data has been read. Often a no-op. 162 | * 163 | * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding 164 | * application must deal with any cleanup that should happen even 165 | * for error exit. 166 | */ 167 | 168 | METHODDEF(void) 169 | term_source (j_decompress_ptr cinfo) 170 | { 171 | /* no work necessary here */ 172 | } 173 | 174 | 175 | /* 176 | * Prepare for input from a stdio stream. 177 | * The caller must have already opened the stream, and is responsible 178 | * for closing it after finishing decompression. 179 | */ 180 | 181 | GLOBAL(void) 182 | jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) 183 | { 184 | my_src_ptr src; 185 | 186 | /* The source object and input buffer are made permanent so that a series 187 | * of JPEG images can be read from the same file by calling jpeg_stdio_src 188 | * only before the first one. (If we discarded the buffer at the end of 189 | * one image, we'd likely lose the start of the next one.) 190 | * This makes it unsafe to use this manager and a different source 191 | * manager serially with the same JPEG object. Caveat programmer. 192 | */ 193 | if (cinfo->src == NULL) { /* first time for this JPEG object? */ 194 | cinfo->src = (struct jpeg_source_mgr *) 195 | (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, 196 | SIZEOF(my_source_mgr)); 197 | src = (my_src_ptr) cinfo->src; 198 | src->buffer = (JOCTET *) 199 | (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, 200 | INPUT_BUF_SIZE * SIZEOF(JOCTET)); 201 | } 202 | 203 | src = (my_src_ptr) cinfo->src; 204 | src->pub.init_source = init_source; 205 | src->pub.fill_input_buffer = fill_input_buffer; 206 | src->pub.skip_input_data = skip_input_data; 207 | src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ 208 | src->pub.term_source = term_source; 209 | src->infile = infile; 210 | src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ 211 | src->pub.next_input_byte = NULL; /* until buffer loaded */ 212 | } 213 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdatasrc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdatasrc.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdcoefct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdcoefct.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdcolor.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdcolor.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jdct.h 3 | * 4 | * Copyright (C) 1994-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This include file contains common declarations for the forward and 9 | * inverse DCT modules. These declarations are private to the DCT managers 10 | * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. 11 | * The individual DCT algorithms are kept in separate files to ease 12 | * machine-dependent tuning (e.g., assembly coding). 13 | */ 14 | 15 | 16 | /* 17 | * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; 18 | * the DCT is to be performed in-place in that buffer. Type DCTELEM is int 19 | * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT 20 | * implementations use an array of type FAST_FLOAT, instead.) 21 | * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). 22 | * The DCT outputs are returned scaled up by a factor of 8; they therefore 23 | * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This 24 | * convention improves accuracy in integer implementations and saves some 25 | * work in floating-point ones. 26 | * Quantization of the output coefficients is done by jcdctmgr.c. 27 | */ 28 | 29 | #if BITS_IN_JSAMPLE == 8 30 | typedef int DCTELEM; /* 16 or 32 bits is fine */ 31 | #else 32 | typedef INT32 DCTELEM; /* must have 32 bits */ 33 | #endif 34 | 35 | typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); 36 | typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data)); 37 | 38 | 39 | /* 40 | * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer 41 | * to an output sample array. The routine must dequantize the input data as 42 | * well as perform the IDCT; for dequantization, it uses the multiplier table 43 | * pointed to by compptr->dct_table. The output data is to be placed into the 44 | * sample array starting at a specified column. (Any row offset needed will 45 | * be applied to the array pointer before it is passed to the IDCT code.) 46 | * Note that the number of samples emitted by the IDCT routine is 47 | * DCT_scaled_size * DCT_scaled_size. 48 | */ 49 | 50 | /* typedef inverse_DCT_method_ptr is declared in jpegint.h */ 51 | 52 | /* 53 | * Each IDCT routine has its own ideas about the best dct_table element type. 54 | */ 55 | 56 | typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ 57 | #if BITS_IN_JSAMPLE == 8 58 | typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ 59 | #define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ 60 | #else 61 | typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ 62 | #define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ 63 | #endif 64 | typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ 65 | 66 | 67 | /* 68 | * Each IDCT routine is responsible for range-limiting its results and 69 | * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could 70 | * be quite far out of range if the input data is corrupt, so a bulletproof 71 | * range-limiting step is required. We use a mask-and-table-lookup method 72 | * to do the combined operations quickly. See the comments with 73 | * prepare_range_limit_table (in jdmaster.c) for more info. 74 | */ 75 | 76 | #define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) 77 | 78 | #define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ 79 | 80 | 81 | /* Short forms of external names for systems with brain-damaged linkers. */ 82 | 83 | #ifdef NEED_SHORT_EXTERNAL_NAMES 84 | #define jpeg_fdct_islow jFDislow 85 | #define jpeg_fdct_ifast jFDifast 86 | #define jpeg_fdct_float jFDfloat 87 | #define jpeg_idct_islow jRDislow 88 | #define jpeg_idct_ifast jRDifast 89 | #define jpeg_idct_float jRDfloat 90 | #define jpeg_idct_4x4 jRD4x4 91 | #define jpeg_idct_2x2 jRD2x2 92 | #define jpeg_idct_1x1 jRD1x1 93 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 94 | 95 | /* Extern declarations for the forward and inverse DCT routines. */ 96 | 97 | EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); 98 | EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); 99 | EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); 100 | 101 | EXTERN(void) jpeg_idct_islow 102 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 103 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 104 | EXTERN(void) jpeg_idct_ifast 105 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 106 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 107 | EXTERN(void) jpeg_idct_float 108 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 109 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 110 | EXTERN(void) jpeg_idct_4x4 111 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 112 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 113 | EXTERN(void) jpeg_idct_2x2 114 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 115 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 116 | EXTERN(void) jpeg_idct_1x1 117 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 118 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 119 | 120 | 121 | /* 122 | * Macros for handling fixed-point arithmetic; these are used by many 123 | * but not all of the DCT/IDCT modules. 124 | * 125 | * All values are expected to be of type INT32. 126 | * Fractional constants are scaled left by CONST_BITS bits. 127 | * CONST_BITS is defined within each module using these macros, 128 | * and may differ from one module to the next. 129 | */ 130 | 131 | #define ONE ((INT32) 1) 132 | #define CONST_SCALE (ONE << CONST_BITS) 133 | 134 | /* Convert a positive real constant to an integer scaled by CONST_SCALE. 135 | * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, 136 | * thus causing a lot of useless floating-point operations at run time. 137 | */ 138 | 139 | #define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) 140 | 141 | /* Descale and correctly round an INT32 value that's scaled by N bits. 142 | * We assume RIGHT_SHIFT rounds towards minus infinity, so adding 143 | * the fudge factor is correct for either sign of X. 144 | */ 145 | 146 | #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) 147 | 148 | /* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. 149 | * This macro is used only when the two inputs will actually be no more than 150 | * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a 151 | * full 32x32 multiply. This provides a useful speedup on many machines. 152 | * Unfortunately there is no way to specify a 16x16->32 multiply portably 153 | * in C, but some C compilers will do the right thing if you provide the 154 | * correct combination of casts. 155 | */ 156 | 157 | #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ 158 | #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) 159 | #endif 160 | #ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ 161 | #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) 162 | #endif 163 | 164 | #ifndef MULTIPLY16C16 /* default definition */ 165 | #define MULTIPLY16C16(var,const) ((var) * (const)) 166 | #endif 167 | 168 | /* Same except both inputs are variables. */ 169 | 170 | #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ 171 | #define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) 172 | #endif 173 | 174 | #ifndef MULTIPLY16V16 /* default definition */ 175 | #define MULTIPLY16V16(var1,var2) ((var1) * (var2)) 176 | #endif 177 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jddctmgr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jddctmgr.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdhuff.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdhuff.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdinput.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdinput.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdmainct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdmainct.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdmarker.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdmarker.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdmaster.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdmaster.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdmerge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdmerge.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdphuff.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdphuff.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdpostct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdpostct.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdsample.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdsample.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdtrans.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jdtrans.c 3 | * 4 | * Copyright (C) 1995-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains library routines for transcoding decompression, 9 | * that is, reading raw DCT coefficient arrays from an input JPEG file. 10 | * The routines in jdapimin.c will also be needed by a transcoder. 11 | */ 12 | 13 | #define JPEG_INTERNALS 14 | #include "jinclude.h" 15 | #include "jpeglib.h" 16 | 17 | 18 | /* Forward declarations */ 19 | LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo)); 20 | 21 | 22 | /* 23 | * Read the coefficient arrays from a JPEG file. 24 | * jpeg_read_header must be completed before calling this. 25 | * 26 | * The entire image is read into a set of virtual coefficient-block arrays, 27 | * one per component. The return value is a pointer to the array of 28 | * virtual-array descriptors. These can be manipulated directly via the 29 | * JPEG memory manager, or handed off to jpeg_write_coefficients(). 30 | * To release the memory occupied by the virtual arrays, call 31 | * jpeg_finish_decompress() when done with the data. 32 | * 33 | * An alternative usage is to simply obtain access to the coefficient arrays 34 | * during a buffered-image-mode decompression operation. This is allowed 35 | * after any jpeg_finish_output() call. The arrays can be accessed until 36 | * jpeg_finish_decompress() is called. (Note that any call to the library 37 | * may reposition the arrays, so don't rely on access_virt_barray() results 38 | * to stay valid across library calls.) 39 | * 40 | * Returns NULL if suspended. This case need be checked only if 41 | * a suspending data source is used. 42 | */ 43 | 44 | GLOBAL(jvirt_barray_ptr *) 45 | jpeg_read_coefficients (j_decompress_ptr cinfo) 46 | { 47 | if (cinfo->global_state == DSTATE_READY) { 48 | /* First call: initialize active modules */ 49 | transdecode_master_selection(cinfo); 50 | cinfo->global_state = DSTATE_RDCOEFS; 51 | } 52 | if (cinfo->global_state == DSTATE_RDCOEFS) { 53 | /* Absorb whole file into the coef buffer */ 54 | for (;;) { 55 | int retcode; 56 | /* Call progress monitor hook if present */ 57 | if (cinfo->progress != NULL) 58 | (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); 59 | /* Absorb some more input */ 60 | retcode = (*cinfo->inputctl->consume_input) (cinfo); 61 | if (retcode == JPEG_SUSPENDED) 62 | return NULL; 63 | if (retcode == JPEG_REACHED_EOI) 64 | break; 65 | /* Advance progress counter if appropriate */ 66 | if (cinfo->progress != NULL && 67 | (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { 68 | if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { 69 | /* startup underestimated number of scans; ratchet up one scan */ 70 | cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; 71 | } 72 | } 73 | } 74 | /* Set state so that jpeg_finish_decompress does the right thing */ 75 | cinfo->global_state = DSTATE_STOPPING; 76 | } 77 | /* At this point we should be in state DSTATE_STOPPING if being used 78 | * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access 79 | * to the coefficients during a full buffered-image-mode decompression. 80 | */ 81 | if ((cinfo->global_state == DSTATE_STOPPING || 82 | cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { 83 | return cinfo->coef->coef_arrays; 84 | } 85 | /* Oops, improper usage */ 86 | ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); 87 | return NULL; /* keep compiler happy */ 88 | } 89 | 90 | 91 | /* 92 | * Master selection of decompression modules for transcoding. 93 | * This substitutes for jdmaster.c's initialization of the full decompressor. 94 | */ 95 | 96 | LOCAL(void) 97 | transdecode_master_selection (j_decompress_ptr cinfo) 98 | { 99 | /* This is effectively a buffered-image operation. */ 100 | cinfo->buffered_image = TRUE; 101 | 102 | /* Entropy decoding: either Huffman or arithmetic coding. */ 103 | if (cinfo->arith_code) { 104 | ERREXIT(cinfo, JERR_ARITH_NOTIMPL); 105 | } else { 106 | if (cinfo->progressive_mode) { 107 | #ifdef D_PROGRESSIVE_SUPPORTED 108 | jinit_phuff_decoder(cinfo); 109 | #else 110 | ERREXIT(cinfo, JERR_NOT_COMPILED); 111 | #endif 112 | } else 113 | jinit_huff_decoder(cinfo); 114 | } 115 | 116 | /* Always get a full-image coefficient buffer. */ 117 | jinit_d_coef_controller(cinfo, TRUE); 118 | 119 | /* We can now tell the memory manager to allocate virtual arrays. */ 120 | (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); 121 | 122 | /* Initialize input side of decompressor to consume first scan. */ 123 | (*cinfo->inputctl->start_input_pass) (cinfo); 124 | 125 | /* Initialize progress monitoring. */ 126 | if (cinfo->progress != NULL) { 127 | int nscans; 128 | /* Estimate number of scans to set pass_limit. */ 129 | if (cinfo->progressive_mode) { 130 | /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ 131 | nscans = 2 + 3 * cinfo->num_components; 132 | } else if (cinfo->inputctl->has_multiple_scans) { 133 | /* For a nonprogressive multiscan file, estimate 1 scan per component. */ 134 | nscans = cinfo->num_components; 135 | } else { 136 | nscans = 1; 137 | } 138 | cinfo->progress->pass_counter = 0L; 139 | cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; 140 | cinfo->progress->completed_passes = 0; 141 | cinfo->progress->total_passes = 1; 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jdtrans.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jdtrans.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jerror.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jerror.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jfdctflt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jfdctflt.c 3 | * 4 | * Copyright (C) 1994-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains a floating-point implementation of the 9 | * forward DCT (Discrete Cosine Transform). 10 | * 11 | * This implementation should be more accurate than either of the integer 12 | * DCT implementations. However, it may not give the same results on all 13 | * machines because of differences in roundoff behavior. Speed will depend 14 | * on the hardware's floating point capacity. 15 | * 16 | * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT 17 | * on each column. Direct algorithms are also available, but they are 18 | * much more complex and seem not to be any faster when reduced to code. 19 | * 20 | * This implementation is based on Arai, Agui, and Nakajima's algorithm for 21 | * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in 22 | * Japanese, but the algorithm is described in the Pennebaker & Mitchell 23 | * JPEG textbook (see REFERENCES section in file README). The following code 24 | * is based directly on figure 4-8 in P&M. 25 | * While an 8-point DCT cannot be done in less than 11 multiplies, it is 26 | * possible to arrange the computation so that many of the multiplies are 27 | * simple scalings of the final outputs. These multiplies can then be 28 | * folded into the multiplications or divisions by the JPEG quantization 29 | * table entries. The AA&N method leaves only 5 multiplies and 29 adds 30 | * to be done in the DCT itself. 31 | * The primary disadvantage of this method is that with a fixed-point 32 | * implementation, accuracy is lost due to imprecise representation of the 33 | * scaled quantization values. However, that problem does not arise if 34 | * we use floating point arithmetic. 35 | */ 36 | 37 | #define JPEG_INTERNALS 38 | #include "jinclude.h" 39 | #include "jpeglib.h" 40 | #include "jdct.h" /* Private declarations for DCT subsystem */ 41 | 42 | #ifdef DCT_FLOAT_SUPPORTED 43 | 44 | 45 | /* 46 | * This module is specialized to the case DCTSIZE = 8. 47 | */ 48 | 49 | #if DCTSIZE != 8 50 | Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ 51 | #endif 52 | 53 | 54 | /* 55 | * Perform the forward DCT on one block of samples. 56 | */ 57 | 58 | GLOBAL(void) 59 | jpeg_fdct_float (FAST_FLOAT * data) 60 | { 61 | FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; 62 | FAST_FLOAT tmp10, tmp11, tmp12, tmp13; 63 | FAST_FLOAT z1, z2, z3, z4, z5, z11, z13; 64 | FAST_FLOAT *dataptr; 65 | int ctr; 66 | 67 | /* Pass 1: process rows. */ 68 | 69 | dataptr = data; 70 | for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { 71 | tmp0 = dataptr[0] + dataptr[7]; 72 | tmp7 = dataptr[0] - dataptr[7]; 73 | tmp1 = dataptr[1] + dataptr[6]; 74 | tmp6 = dataptr[1] - dataptr[6]; 75 | tmp2 = dataptr[2] + dataptr[5]; 76 | tmp5 = dataptr[2] - dataptr[5]; 77 | tmp3 = dataptr[3] + dataptr[4]; 78 | tmp4 = dataptr[3] - dataptr[4]; 79 | 80 | /* Even part */ 81 | 82 | tmp10 = tmp0 + tmp3; /* phase 2 */ 83 | tmp13 = tmp0 - tmp3; 84 | tmp11 = tmp1 + tmp2; 85 | tmp12 = tmp1 - tmp2; 86 | 87 | dataptr[0] = tmp10 + tmp11; /* phase 3 */ 88 | dataptr[4] = tmp10 - tmp11; 89 | 90 | z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ 91 | dataptr[2] = tmp13 + z1; /* phase 5 */ 92 | dataptr[6] = tmp13 - z1; 93 | 94 | /* Odd part */ 95 | 96 | tmp10 = tmp4 + tmp5; /* phase 2 */ 97 | tmp11 = tmp5 + tmp6; 98 | tmp12 = tmp6 + tmp7; 99 | 100 | /* The rotator is modified from fig 4-8 to avoid extra negations. */ 101 | z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ 102 | z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ 103 | z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ 104 | z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ 105 | 106 | z11 = tmp7 + z3; /* phase 5 */ 107 | z13 = tmp7 - z3; 108 | 109 | dataptr[5] = z13 + z2; /* phase 6 */ 110 | dataptr[3] = z13 - z2; 111 | dataptr[1] = z11 + z4; 112 | dataptr[7] = z11 - z4; 113 | 114 | dataptr += DCTSIZE; /* advance pointer to next row */ 115 | } 116 | 117 | /* Pass 2: process columns. */ 118 | 119 | dataptr = data; 120 | for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { 121 | tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; 122 | tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; 123 | tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; 124 | tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; 125 | tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; 126 | tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; 127 | tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; 128 | tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; 129 | 130 | /* Even part */ 131 | 132 | tmp10 = tmp0 + tmp3; /* phase 2 */ 133 | tmp13 = tmp0 - tmp3; 134 | tmp11 = tmp1 + tmp2; 135 | tmp12 = tmp1 - tmp2; 136 | 137 | dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ 138 | dataptr[DCTSIZE*4] = tmp10 - tmp11; 139 | 140 | z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ 141 | dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ 142 | dataptr[DCTSIZE*6] = tmp13 - z1; 143 | 144 | /* Odd part */ 145 | 146 | tmp10 = tmp4 + tmp5; /* phase 2 */ 147 | tmp11 = tmp5 + tmp6; 148 | tmp12 = tmp6 + tmp7; 149 | 150 | /* The rotator is modified from fig 4-8 to avoid extra negations. */ 151 | z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ 152 | z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ 153 | z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ 154 | z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ 155 | 156 | z11 = tmp7 + z3; /* phase 5 */ 157 | z13 = tmp7 - z3; 158 | 159 | dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ 160 | dataptr[DCTSIZE*3] = z13 - z2; 161 | dataptr[DCTSIZE*1] = z11 + z4; 162 | dataptr[DCTSIZE*7] = z11 - z4; 163 | 164 | dataptr++; /* advance pointer to next column */ 165 | } 166 | } 167 | 168 | #endif /* DCT_FLOAT_SUPPORTED */ 169 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jfdctflt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jfdctflt.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jfdctfst.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jfdctfst.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jfdctint.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jfdctint.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jidctflt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jidctflt.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jidctfst.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jidctfst.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jidctint.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jidctint.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jidctred.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jidctred.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jinclude.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jinclude.h 3 | * 4 | * Copyright (C) 1991-1994, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file exists to provide a single place to fix any problems with 9 | * including the wrong system include files. (Common problems are taken 10 | * care of by the standard jconfig symbols, but on really weird systems 11 | * you may have to edit this file.) 12 | * 13 | * NOTE: this file is NOT intended to be included by applications using the 14 | * JPEG library. Most applications need only include jpeglib.h. 15 | */ 16 | 17 | 18 | /* Include auto-config file to find out which system include files we need. */ 19 | 20 | #include "jconfig.h" /* auto configuration options */ 21 | #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ 22 | 23 | /* 24 | * We need the NULL macro and size_t typedef. 25 | * On an ANSI-conforming system it is sufficient to include . 26 | * Otherwise, we get them from or ; we may have to 27 | * pull in as well. 28 | * Note that the core JPEG library does not require ; 29 | * only the default error handler and data source/destination modules do. 30 | * But we must pull it in because of the references to FILE in jpeglib.h. 31 | * You can remove those references if you want to compile without . 32 | */ 33 | 34 | #ifdef HAVE_STDDEF_H 35 | #include 36 | #endif 37 | 38 | #ifdef HAVE_STDLIB_H 39 | #include 40 | #endif 41 | 42 | #ifdef NEED_SYS_TYPES_H 43 | #include 44 | #endif 45 | 46 | #include 47 | 48 | /* 49 | * We need memory copying and zeroing functions, plus strncpy(). 50 | * ANSI and System V implementations declare these in . 51 | * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). 52 | * Some systems may declare memset and memcpy in . 53 | * 54 | * NOTE: we assume the size parameters to these functions are of type size_t. 55 | * Change the casts in these macros if not! 56 | */ 57 | 58 | #ifdef NEED_BSD_STRINGS 59 | 60 | #include 61 | #define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) 62 | #define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) 63 | 64 | #else /* not BSD, assume ANSI/SysV string lib */ 65 | 66 | #include 67 | #define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) 68 | #define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) 69 | 70 | #endif 71 | 72 | /* 73 | * In ANSI C, and indeed any rational implementation, size_t is also the 74 | * type returned by sizeof(). However, it seems there are some irrational 75 | * implementations out there, in which sizeof() returns an int even though 76 | * size_t is defined as long or unsigned long. To ensure consistent results 77 | * we always use this SIZEOF() macro in place of using sizeof() directly. 78 | */ 79 | 80 | #define SIZEOF(object) ((size_t) sizeof(object)) 81 | 82 | /* 83 | * The modules that use fread() and fwrite() always invoke them through 84 | * these macros. On some systems you may need to twiddle the argument casts. 85 | * CAUTION: argument order is different from underlying functions! 86 | */ 87 | 88 | #define JFREAD(file,buf,sizeofbuf) \ 89 | ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) 90 | #define JFWRITE(file,buf,sizeofbuf) \ 91 | ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) 92 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jmemansi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jmemansi.c 3 | * 4 | * Copyright (C) 1992-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file provides a simple generic implementation of the system- 9 | * dependent portion of the JPEG memory manager. This implementation 10 | * assumes that you have the ANSI-standard library routine tmpfile(). 11 | * Also, the problem of determining the amount of memory available 12 | * is shoved onto the user. 13 | */ 14 | 15 | #define JPEG_INTERNALS 16 | #include "jinclude.h" 17 | #include "jpeglib.h" 18 | #include "jmemsys.h" /* import the system-dependent declarations */ 19 | 20 | #ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ 21 | extern void * malloc JPP((size_t size)); 22 | extern void free JPP((void *ptr)); 23 | #endif 24 | 25 | #ifndef SEEK_SET /* pre-ANSI systems may not define this; */ 26 | #define SEEK_SET 0 /* if not, assume 0 is correct */ 27 | #endif 28 | 29 | 30 | /* 31 | * Memory allocation and freeing are controlled by the regular library 32 | * routines malloc() and free(). 33 | */ 34 | 35 | GLOBAL(void *) 36 | jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) 37 | { 38 | return (void *) malloc(sizeofobject); 39 | } 40 | 41 | GLOBAL(void) 42 | jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) 43 | { 44 | free(object); 45 | } 46 | 47 | 48 | /* 49 | * "Large" objects are treated the same as "small" ones. 50 | * NB: although we include FAR keywords in the routine declarations, 51 | * this file won't actually work in 80x86 small/medium model; at least, 52 | * you probably won't be able to process useful-size images in only 64KB. 53 | */ 54 | 55 | GLOBAL(void FAR *) 56 | jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) 57 | { 58 | return (void FAR *) malloc(sizeofobject); 59 | } 60 | 61 | GLOBAL(void) 62 | jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) 63 | { 64 | free(object); 65 | } 66 | 67 | 68 | /* 69 | * This routine computes the total memory space available for allocation. 70 | * It's impossible to do this in a portable way; our current solution is 71 | * to make the user tell us (with a default value set at compile time). 72 | * If you can actually get the available space, it's a good idea to subtract 73 | * a slop factor of 5% or so. 74 | */ 75 | 76 | #ifndef DEFAULT_MAX_MEM /* so can override from makefile */ 77 | #define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ 78 | #endif 79 | 80 | GLOBAL(long) 81 | jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, 82 | long max_bytes_needed, long already_allocated) 83 | { 84 | return cinfo->mem->max_memory_to_use - already_allocated; 85 | } 86 | 87 | 88 | /* 89 | * Backing store (temporary file) management. 90 | * Backing store objects are only used when the value returned by 91 | * jpeg_mem_available is less than the total space needed. You can dispense 92 | * with these routines if you have plenty of virtual memory; see jmemnobs.c. 93 | */ 94 | 95 | 96 | METHODDEF(void) 97 | read_backing_store (j_common_ptr cinfo, backing_store_ptr info, 98 | void FAR * buffer_address, 99 | long file_offset, long byte_count) 100 | { 101 | if (fseek(info->temp_file, file_offset, SEEK_SET)) 102 | ERREXIT(cinfo, JERR_TFILE_SEEK); 103 | if (JFREAD(info->temp_file, buffer_address, byte_count) 104 | != (size_t) byte_count) 105 | ERREXIT(cinfo, JERR_TFILE_READ); 106 | } 107 | 108 | 109 | METHODDEF(void) 110 | write_backing_store (j_common_ptr cinfo, backing_store_ptr info, 111 | void FAR * buffer_address, 112 | long file_offset, long byte_count) 113 | { 114 | if (fseek(info->temp_file, file_offset, SEEK_SET)) 115 | ERREXIT(cinfo, JERR_TFILE_SEEK); 116 | if (JFWRITE(info->temp_file, buffer_address, byte_count) 117 | != (size_t) byte_count) 118 | ERREXIT(cinfo, JERR_TFILE_WRITE); 119 | } 120 | 121 | 122 | METHODDEF(void) 123 | close_backing_store (j_common_ptr cinfo, backing_store_ptr info) 124 | { 125 | fclose(info->temp_file); 126 | /* Since this implementation uses tmpfile() to create the file, 127 | * no explicit file deletion is needed. 128 | */ 129 | } 130 | 131 | 132 | /* 133 | * Initial opening of a backing-store object. 134 | * 135 | * This version uses tmpfile(), which constructs a suitable file name 136 | * behind the scenes. We don't have to use info->temp_name[] at all; 137 | * indeed, we can't even find out the actual name of the temp file. 138 | */ 139 | 140 | GLOBAL(void) 141 | jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, 142 | long total_bytes_needed) 143 | { 144 | if ((info->temp_file = tmpfile()) == NULL) 145 | ERREXITS(cinfo, JERR_TFILE_CREATE, ""); 146 | info->read_backing_store = read_backing_store; 147 | info->write_backing_store = write_backing_store; 148 | info->close_backing_store = close_backing_store; 149 | } 150 | 151 | 152 | /* 153 | * These routines take care of any system-dependent initialization and 154 | * cleanup required. 155 | */ 156 | 157 | GLOBAL(long) 158 | jpeg_mem_init (j_common_ptr cinfo) 159 | { 160 | return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ 161 | } 162 | 163 | GLOBAL(void) 164 | jpeg_mem_term (j_common_ptr cinfo) 165 | { 166 | /* no work */ 167 | } 168 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jmemmgr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jmemmgr.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jmemnobs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jmemnobs.c 3 | * 4 | * Copyright (C) 1992-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file provides a really simple implementation of the system- 9 | * dependent portion of the JPEG memory manager. This implementation 10 | * assumes that no backing-store files are needed: all required space 11 | * can be obtained from malloc(). 12 | * This is very portable in the sense that it'll compile on almost anything, 13 | * but you'd better have lots of main memory (or virtual memory) if you want 14 | * to process big images. 15 | * Note that the max_memory_to_use option is ignored by this implementation. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | #include "jmemsys.h" /* import the system-dependent declarations */ 22 | 23 | #ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ 24 | extern void * malloc JPP((size_t size)); 25 | extern void free JPP((void *ptr)); 26 | #endif 27 | 28 | 29 | /* 30 | * Memory allocation and freeing are controlled by the regular library 31 | * routines malloc() and free(). 32 | */ 33 | 34 | GLOBAL(void *) 35 | jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) 36 | { 37 | return (void *) malloc(sizeofobject); 38 | } 39 | 40 | GLOBAL(void) 41 | jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) 42 | { 43 | free(object); 44 | } 45 | 46 | 47 | /* 48 | * "Large" objects are treated the same as "small" ones. 49 | * NB: although we include FAR keywords in the routine declarations, 50 | * this file won't actually work in 80x86 small/medium model; at least, 51 | * you probably won't be able to process useful-size images in only 64KB. 52 | */ 53 | 54 | GLOBAL(void FAR *) 55 | jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) 56 | { 57 | return (void FAR *) malloc(sizeofobject); 58 | } 59 | 60 | GLOBAL(void) 61 | jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) 62 | { 63 | free(object); 64 | } 65 | 66 | 67 | /* 68 | * This routine computes the total memory space available for allocation. 69 | * Here we always say, "we got all you want bud!" 70 | */ 71 | 72 | GLOBAL(long) 73 | jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, 74 | long max_bytes_needed, long already_allocated) 75 | { 76 | return max_bytes_needed; 77 | } 78 | 79 | 80 | /* 81 | * Backing store (temporary file) management. 82 | * Since jpeg_mem_available always promised the moon, 83 | * this should never be called and we can just error out. 84 | */ 85 | 86 | GLOBAL(void) 87 | jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, 88 | long total_bytes_needed) 89 | { 90 | ERREXIT(cinfo, JERR_NO_BACKING_STORE); 91 | } 92 | 93 | 94 | /* 95 | * These routines take care of any system-dependent initialization and 96 | * cleanup required. Here, there isn't any. 97 | */ 98 | 99 | GLOBAL(long) 100 | jpeg_mem_init (j_common_ptr cinfo) 101 | { 102 | return 0; /* just set max_memory_to_use to 0 */ 103 | } 104 | 105 | GLOBAL(void) 106 | jpeg_mem_term (j_common_ptr cinfo) 107 | { 108 | /* no work */ 109 | } 110 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jmemnobs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jmemnobs.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jpegtran: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jpegtran -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jpegtran.1: -------------------------------------------------------------------------------- 1 | .TH JPEGTRAN 1 "3 August 1997" 2 | .SH NAME 3 | jpegtran \- lossless transformation of JPEG files 4 | .SH SYNOPSIS 5 | .B jpegtran 6 | [ 7 | .I options 8 | ] 9 | [ 10 | .I filename 11 | ] 12 | .LP 13 | .SH DESCRIPTION 14 | .LP 15 | .B jpegtran 16 | performs various useful transformations of JPEG files. 17 | It can translate the coded representation from one variant of JPEG to another, 18 | for example from baseline JPEG to progressive JPEG or vice versa. It can also 19 | perform some rearrangements of the image data, for example turning an image 20 | from landscape to portrait format by rotation. 21 | .PP 22 | .B jpegtran 23 | works by rearranging the compressed data (DCT coefficients), without 24 | ever fully decoding the image. Therefore, its transformations are lossless: 25 | there is no image degradation at all, which would not be true if you used 26 | .B djpeg 27 | followed by 28 | .B cjpeg 29 | to accomplish the same conversion. But by the same token, 30 | .B jpegtran 31 | cannot perform lossy operations such as changing the image quality. 32 | .PP 33 | .B jpegtran 34 | reads the named JPEG/JFIF file, or the standard input if no file is 35 | named, and produces a JPEG/JFIF file on the standard output. 36 | .SH OPTIONS 37 | All switch names may be abbreviated; for example, 38 | .B \-optimize 39 | may be written 40 | .B \-opt 41 | or 42 | .BR \-o . 43 | Upper and lower case are equivalent. 44 | British spellings are also accepted (e.g., 45 | .BR \-optimise ), 46 | though for brevity these are not mentioned below. 47 | .PP 48 | To specify the coded JPEG representation used in the output file, 49 | .B jpegtran 50 | accepts a subset of the switches recognized by 51 | .BR cjpeg : 52 | .TP 53 | .B \-optimize 54 | Perform optimization of entropy encoding parameters. 55 | .TP 56 | .B \-progressive 57 | Create progressive JPEG file. 58 | .TP 59 | .BI \-restart " N" 60 | Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is 61 | attached to the number. 62 | .TP 63 | .BI \-scans " file" 64 | Use the scan script given in the specified text file. 65 | .PP 66 | See 67 | .BR cjpeg (1) 68 | for more details about these switches. 69 | If you specify none of these switches, you get a plain baseline-JPEG output 70 | file. The quality setting and so forth are determined by the input file. 71 | .PP 72 | The image can be losslessly transformed by giving one of these switches: 73 | .TP 74 | .B \-flip horizontal 75 | Mirror image horizontally (left-right). 76 | .TP 77 | .B \-flip vertical 78 | Mirror image vertically (top-bottom). 79 | .TP 80 | .B \-rotate 90 81 | Rotate image 90 degrees clockwise. 82 | .TP 83 | .B \-rotate 180 84 | Rotate image 180 degrees. 85 | .TP 86 | .B \-rotate 270 87 | Rotate image 270 degrees clockwise (or 90 ccw). 88 | .TP 89 | .B \-transpose 90 | Transpose image (across UL-to-LR axis). 91 | .TP 92 | .B \-transverse 93 | Transverse transpose (across UR-to-LL axis). 94 | .PP 95 | The transpose transformation has no restrictions regarding image dimensions. 96 | The other transformations operate rather oddly if the image dimensions are not 97 | a multiple of the iMCU size (usually 8 or 16 pixels), because they can only 98 | transform complete blocks of DCT coefficient data in the desired way. 99 | .PP 100 | .BR jpegtran 's 101 | default behavior when transforming an odd-size image is designed 102 | to preserve exact reversibility and mathematical consistency of the 103 | transformation set. As stated, transpose is able to flip the entire image 104 | area. Horizontal mirroring leaves any partial iMCU column at the right edge 105 | untouched, but is able to flip all rows of the image. Similarly, vertical 106 | mirroring leaves any partial iMCU row at the bottom edge untouched, but is 107 | able to flip all columns. The other transforms can be built up as sequences 108 | of transpose and flip operations; for consistency, their actions on edge 109 | pixels are defined to be the same as the end result of the corresponding 110 | transpose-and-flip sequence. 111 | .PP 112 | For practical use, you may prefer to discard any untransformable edge pixels 113 | rather than having a strange-looking strip along the right and/or bottom edges 114 | of a transformed image. To do this, add the 115 | .B \-trim 116 | switch: 117 | .TP 118 | .B \-trim 119 | Drop non-transformable edge blocks. 120 | .PP 121 | Obviously, a transformation with 122 | .B \-trim 123 | is not reversible, so strictly speaking 124 | .B jpegtran 125 | with this switch is not lossless. Also, the expected mathematical 126 | equivalences between the transformations no longer hold. For example, 127 | .B \-rot 270 -trim 128 | trims only the bottom edge, but 129 | .B \-rot 90 -trim 130 | followed by 131 | .B \-rot 180 -trim 132 | trims both edges. 133 | .PP 134 | Another not-strictly-lossless transformation switch is: 135 | .TP 136 | .B \-grayscale 137 | Force grayscale output. 138 | .PP 139 | This option discards the chrominance channels if the input image is YCbCr 140 | (ie, a standard color JPEG), resulting in a grayscale JPEG file. The 141 | luminance channel is preserved exactly, so this is a better method of reducing 142 | to grayscale than decompression, conversion, and recompression. This switch 143 | is particularly handy for fixing a monochrome picture that was mistakenly 144 | encoded as a color JPEG. (In such a case, the space savings from getting rid 145 | of the near-empty chroma channels won't be large; but the decoding time for 146 | a grayscale JPEG is substantially less than that for a color JPEG.) 147 | .PP 148 | .B jpegtran 149 | also recognizes these switches that control what to do with "extra" markers, 150 | such as comment blocks: 151 | .TP 152 | .B \-copy none 153 | Copy no extra markers from source file. This setting suppresses all 154 | comments and other excess baggage present in the source file. 155 | .TP 156 | .B \-copy comments 157 | Copy only comment markers. This setting copies comments from the source file, 158 | but discards any other inessential data. 159 | .TP 160 | .B \-copy all 161 | Copy all extra markers. This setting preserves miscellaneous markers 162 | found in the source file, such as JFIF thumbnails and Photoshop settings. 163 | In some files these extra markers can be sizable. 164 | .PP 165 | The default behavior is 166 | .BR "\-copy comments" . 167 | (Note: in IJG releases v6 and v6a, 168 | .B jpegtran 169 | always did the equivalent of 170 | .BR "\-copy none" .) 171 | .PP 172 | Additional switches recognized by jpegtran are: 173 | .TP 174 | .BI \-maxmemory " N" 175 | Set limit for amount of memory to use in processing large images. Value is 176 | in thousands of bytes, or millions of bytes if "M" is attached to the 177 | number. For example, 178 | .B \-max 4m 179 | selects 4000000 bytes. If more space is needed, temporary files will be used. 180 | .TP 181 | .BI \-outfile " name" 182 | Send output image to the named file, not to standard output. 183 | .TP 184 | .B \-verbose 185 | Enable debug printout. More 186 | .BR \-v 's 187 | give more output. Also, version information is printed at startup. 188 | .TP 189 | .B \-debug 190 | Same as 191 | .BR \-verbose . 192 | .SH EXAMPLES 193 | .LP 194 | This example converts a baseline JPEG file to progressive form: 195 | .IP 196 | .B jpegtran \-progressive 197 | .I foo.jpg 198 | .B > 199 | .I fooprog.jpg 200 | .PP 201 | This example rotates an image 90 degrees clockwise, discarding any 202 | unrotatable edge pixels: 203 | .IP 204 | .B jpegtran \-rot 90 -trim 205 | .I foo.jpg 206 | .B > 207 | .I foo90.jpg 208 | .SH ENVIRONMENT 209 | .TP 210 | .B JPEGMEM 211 | If this environment variable is set, its value is the default memory limit. 212 | The value is specified as described for the 213 | .B \-maxmemory 214 | switch. 215 | .B JPEGMEM 216 | overrides the default value specified when the program was compiled, and 217 | itself is overridden by an explicit 218 | .BR \-maxmemory . 219 | .SH SEE ALSO 220 | .BR cjpeg (1), 221 | .BR djpeg (1), 222 | .BR rdjpgcom (1), 223 | .BR wrjpgcom (1) 224 | .br 225 | Wallace, Gregory K. "The JPEG Still Picture Compression Standard", 226 | Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. 227 | .SH AUTHOR 228 | Independent JPEG Group 229 | .SH BUGS 230 | Arithmetic coding is not supported for legal reasons. 231 | .PP 232 | The transform options can't transform odd-size images perfectly. Use 233 | .B \-trim 234 | if you don't like the results without it. 235 | .PP 236 | The entire image is read into memory and then written out again, even in 237 | cases where this isn't really necessary. Expect swapping on large images, 238 | especially when using the more complex transform options. 239 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jpegtran.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jpegtran.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jquant1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jquant1.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jquant2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jquant2.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jutils.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jutils.c 3 | * 4 | * Copyright (C) 1991-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains tables and miscellaneous utility routines needed 9 | * for both compression and decompression. 10 | * Note we prefix all global names with "j" to minimize conflicts with 11 | * a surrounding application. 12 | */ 13 | 14 | #define JPEG_INTERNALS 15 | #include "jinclude.h" 16 | #include "jpeglib.h" 17 | 18 | 19 | /* 20 | * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element 21 | * of a DCT block read in natural order (left to right, top to bottom). 22 | */ 23 | 24 | #if 0 /* This table is not actually needed in v6a */ 25 | 26 | const int jpeg_zigzag_order[DCTSIZE2] = { 27 | 0, 1, 5, 6, 14, 15, 27, 28, 28 | 2, 4, 7, 13, 16, 26, 29, 42, 29 | 3, 8, 12, 17, 25, 30, 41, 43, 30 | 9, 11, 18, 24, 31, 40, 44, 53, 31 | 10, 19, 23, 32, 39, 45, 52, 54, 32 | 20, 22, 33, 38, 46, 51, 55, 60, 33 | 21, 34, 37, 47, 50, 56, 59, 61, 34 | 35, 36, 48, 49, 57, 58, 62, 63 35 | }; 36 | 37 | #endif 38 | 39 | /* 40 | * jpeg_natural_order[i] is the natural-order position of the i'th element 41 | * of zigzag order. 42 | * 43 | * When reading corrupted data, the Huffman decoders could attempt 44 | * to reference an entry beyond the end of this array (if the decoded 45 | * zero run length reaches past the end of the block). To prevent 46 | * wild stores without adding an inner-loop test, we put some extra 47 | * "63"s after the real entries. This will cause the extra coefficient 48 | * to be stored in location 63 of the block, not somewhere random. 49 | * The worst case would be a run-length of 15, which means we need 16 50 | * fake entries. 51 | */ 52 | 53 | const int jpeg_natural_order[DCTSIZE2+16] = { 54 | 0, 1, 8, 16, 9, 2, 3, 10, 55 | 17, 24, 32, 25, 18, 11, 4, 5, 56 | 12, 19, 26, 33, 40, 48, 41, 34, 57 | 27, 20, 13, 6, 7, 14, 21, 28, 58 | 35, 42, 49, 56, 57, 50, 43, 36, 59 | 29, 22, 15, 23, 30, 37, 44, 51, 60 | 58, 59, 52, 45, 38, 31, 39, 46, 61 | 53, 60, 61, 54, 47, 55, 62, 63, 62 | 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ 63 | 63, 63, 63, 63, 63, 63, 63, 63 64 | }; 65 | 66 | 67 | /* 68 | * Arithmetic utilities 69 | */ 70 | 71 | GLOBAL(long) 72 | jdiv_round_up (long a, long b) 73 | /* Compute a/b rounded up to next integer, ie, ceil(a/b) */ 74 | /* Assumes a >= 0, b > 0 */ 75 | { 76 | return (a + b - 1L) / b; 77 | } 78 | 79 | 80 | GLOBAL(long) 81 | jround_up (long a, long b) 82 | /* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ 83 | /* Assumes a >= 0, b > 0 */ 84 | { 85 | a += b - 1L; 86 | return a - (a % b); 87 | } 88 | 89 | 90 | /* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays 91 | * and coefficient-block arrays. This won't work on 80x86 because the arrays 92 | * are FAR and we're assuming a small-pointer memory model. However, some 93 | * DOS compilers provide far-pointer versions of memcpy() and memset() even 94 | * in the small-model libraries. These will be used if USE_FMEM is defined. 95 | * Otherwise, the routines below do it the hard way. (The performance cost 96 | * is not all that great, because these routines aren't very heavily used.) 97 | */ 98 | 99 | #ifndef NEED_FAR_POINTERS /* normal case, same as regular macros */ 100 | #define FMEMCOPY(dest,src,size) MEMCOPY(dest,src,size) 101 | #define FMEMZERO(target,size) MEMZERO(target,size) 102 | #else /* 80x86 case, define if we can */ 103 | #ifdef USE_FMEM 104 | #define FMEMCOPY(dest,src,size) _fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size)) 105 | #define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) 106 | #endif 107 | #endif 108 | 109 | 110 | GLOBAL(void) 111 | jcopy_sample_rows (JSAMPARRAY input_array, int source_row, 112 | JSAMPARRAY output_array, int dest_row, 113 | int num_rows, JDIMENSION num_cols) 114 | /* Copy some rows of samples from one place to another. 115 | * num_rows rows are copied from input_array[source_row++] 116 | * to output_array[dest_row++]; these areas may overlap for duplication. 117 | * The source and destination arrays must be at least as wide as num_cols. 118 | */ 119 | { 120 | register JSAMPROW inptr, outptr; 121 | #ifdef FMEMCOPY 122 | register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE)); 123 | #else 124 | register JDIMENSION count; 125 | #endif 126 | register int row; 127 | 128 | input_array += source_row; 129 | output_array += dest_row; 130 | 131 | for (row = num_rows; row > 0; row--) { 132 | inptr = *input_array++; 133 | outptr = *output_array++; 134 | #ifdef FMEMCOPY 135 | FMEMCOPY(outptr, inptr, count); 136 | #else 137 | for (count = num_cols; count > 0; count--) 138 | *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */ 139 | #endif 140 | } 141 | } 142 | 143 | 144 | GLOBAL(void) 145 | jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, 146 | JDIMENSION num_blocks) 147 | /* Copy a row of coefficient blocks from one place to another. */ 148 | { 149 | #ifdef FMEMCOPY 150 | FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))); 151 | #else 152 | register JCOEFPTR inptr, outptr; 153 | register long count; 154 | 155 | inptr = (JCOEFPTR) input_row; 156 | outptr = (JCOEFPTR) output_row; 157 | for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) { 158 | *outptr++ = *inptr++; 159 | } 160 | #endif 161 | } 162 | 163 | 164 | GLOBAL(void) 165 | jzero_far (void FAR * target, size_t bytestozero) 166 | /* Zero out a chunk of FAR memory. */ 167 | /* This might be sample-array data, block-array data, or alloc_large data. */ 168 | { 169 | #ifdef FMEMZERO 170 | FMEMZERO(target, bytestozero); 171 | #else 172 | register char FAR * ptr = (char FAR *) target; 173 | register size_t count; 174 | 175 | for (count = bytestozero; count > 0; count--) { 176 | *ptr++ = 0; 177 | } 178 | #endif 179 | } 180 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jutils.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/jutils.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/libjpeg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/libjpeg.a -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/makcjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to cjpeg.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | cjpeg.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 30 | rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 31 | rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 32 | rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 33 | rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 34 | libjpeg.lib ; built by libjpeg.prj 35 | pcfltlib.lib ; floating point library 36 | ; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED 37 | pcstdlib.lib ; standard library 38 | pcextlib.lib ; extended library 39 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/makdjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to djpeg.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | djpeg.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 30 | wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 31 | wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 32 | wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 33 | wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 34 | libjpeg.lib ; built by libjpeg.prj 35 | pcfltlib.lib ; floating point library 36 | ; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED 37 | pcstdlib.lib ; standard library 38 | pcextlib.lib ; extended library 39 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/makefile.vms: -------------------------------------------------------------------------------- 1 | $! Makefile for Independent JPEG Group's software 2 | $! 3 | $! This is a command procedure for Digital VMS systems that do not have MMS. 4 | $! It builds the JPEG software by brute force, recompiling everything whether 5 | $! or not it is necessary. It then runs the basic self-test. 6 | $! Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) 7 | $! and Tim Bell (tbell@netcom.com) for their help. 8 | $! 9 | $! Read installation instructions before running this!! 10 | $! 11 | $ If F$Mode () .eqs. "INTERACTIVE" 12 | $ Then 13 | $ VERIFY = F$Verify (0) 14 | $ Else 15 | $ VERIFY = F$Verify (1) 16 | $ EndIf 17 | $ On Control_Y Then GoTo End 18 | $ On Error Then GoTo End 19 | $ 20 | $ If F$GetSyi ("HW_MODEL") .gt. 1023 21 | $ Then 22 | $ OPT = "" 23 | $ Else 24 | $ OPT = ",Sys$Disk:[]makvms.opt/Option" 25 | $ EndIf 26 | $ 27 | $ DoCompile := CC /NoDebug /Optimize /NoList 28 | $! 29 | $ DoCompile jcapimin.c 30 | $ DoCompile jcapistd.c 31 | $ DoCompile jctrans.c 32 | $ DoCompile jcparam.c 33 | $ DoCompile jdatadst.c 34 | $ DoCompile jcinit.c 35 | $ DoCompile jcmaster.c 36 | $ DoCompile jcmarker.c 37 | $ DoCompile jcmainct.c 38 | $ DoCompile jcprepct.c 39 | $ DoCompile jccoefct.c 40 | $ DoCompile jccolor.c 41 | $ DoCompile jcsample.c 42 | $ DoCompile jchuff.c 43 | $ DoCompile jcphuff.c 44 | $ DoCompile jcdctmgr.c 45 | $ DoCompile jfdctfst.c 46 | $ DoCompile jfdctflt.c 47 | $ DoCompile jfdctint.c 48 | $ DoCompile jdapimin.c 49 | $ DoCompile jdapistd.c 50 | $ DoCompile jdtrans.c 51 | $ DoCompile jdatasrc.c 52 | $ DoCompile jdmaster.c 53 | $ DoCompile jdinput.c 54 | $ DoCompile jdmarker.c 55 | $ DoCompile jdhuff.c 56 | $ DoCompile jdphuff.c 57 | $ DoCompile jdmainct.c 58 | $ DoCompile jdcoefct.c 59 | $ DoCompile jdpostct.c 60 | $ DoCompile jddctmgr.c 61 | $ DoCompile jidctfst.c 62 | $ DoCompile jidctflt.c 63 | $ DoCompile jidctint.c 64 | $ DoCompile jidctred.c 65 | $ DoCompile jdsample.c 66 | $ DoCompile jdcolor.c 67 | $ DoCompile jquant1.c 68 | $ DoCompile jquant2.c 69 | $ DoCompile jdmerge.c 70 | $ DoCompile jcomapi.c 71 | $ DoCompile jutils.c 72 | $ DoCompile jerror.c 73 | $ DoCompile jmemmgr.c 74 | $ DoCompile jmemnobs.c 75 | $! 76 | $ Library /Create libjpeg.olb jcapimin.obj,jcapistd.obj,jctrans.obj, - 77 | jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj, - 78 | jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj, - 79 | jchuff.obj,jcphuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj, - 80 | jfdctint.obj,jdapimin.obj,jdapistd.obj,jdtrans.obj,jdatasrc.obj, - 81 | jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdphuff.obj, - 82 | jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj, - 83 | jidctflt.obj,jidctint.obj,jidctred.obj,jdsample.obj,jdcolor.obj, - 84 | jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, - 85 | jerror.obj,jmemmgr.obj,jmemnobs.obj 86 | $! 87 | $ DoCompile cjpeg.c 88 | $ DoCompile rdppm.c 89 | $ DoCompile rdgif.c 90 | $ DoCompile rdtarga.c 91 | $ DoCompile rdrle.c 92 | $ DoCompile rdbmp.c 93 | $ DoCompile rdswitch.c 94 | $ DoCompile cdjpeg.c 95 | $! 96 | $ Link /NoMap /Executable = cjpeg.exe cjpeg.obj,rdppm.obj,rdgif.obj, - 97 | rdtarga.obj,rdrle.obj,rdbmp.obj,rdswitch.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' 98 | $! 99 | $ DoCompile djpeg.c 100 | $ DoCompile wrppm.c 101 | $ DoCompile wrgif.c 102 | $ DoCompile wrtarga.c 103 | $ DoCompile wrrle.c 104 | $ DoCompile wrbmp.c 105 | $ DoCompile rdcolmap.c 106 | $ DoCompile cdjpeg.c 107 | $! 108 | $ Link /NoMap /Executable = djpeg.exe djpeg.obj,wrppm.obj,wrgif.obj, - 109 | wrtarga.obj,wrrle.obj,wrbmp.obj,rdcolmap.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' 110 | $! 111 | $ DoCompile jpegtran.c 112 | $ DoCompile rdswitch.c 113 | $ DoCompile cdjpeg.c 114 | $ DoCompile transupp.c 115 | $! 116 | $ Link /NoMap /Executable = jpegtran.exe jpegtran.obj,rdswitch.obj, - 117 | cdjpeg.obj,transupp.obj,libjpeg.olb/Library'OPT' 118 | $! 119 | $ DoCompile rdjpgcom.c 120 | $ Link /NoMap /Executable = rdjpgcom.exe rdjpgcom.obj'OPT' 121 | $! 122 | $ DoCompile wrjpgcom.c 123 | $ Link /NoMap /Executable = wrjpgcom.exe wrjpgcom.obj'OPT' 124 | $! 125 | $! Run the self-test 126 | $! 127 | $ mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg 128 | $ mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg 129 | $ mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm 130 | $ mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg 131 | $ mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm 132 | $ mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg 133 | $ Backup /Compare/Log testimg.ppm testout.ppm 134 | $ Backup /Compare/Log testimg.bmp testout.bmp 135 | $ Backup /Compare/Log testimg.jpg testout.jpg 136 | $ Backup /Compare/Log testimg.ppm testoutp.ppm 137 | $ Backup /Compare/Log testimgp.jpg testoutp.jpg 138 | $ Backup /Compare/Log testorig.jpg testoutt.jpg 139 | $! 140 | $End: 141 | $ If Verify Then Set Verify 142 | $ Exit 143 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/makljpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to libjpeg.prj. 9 | ; Read installation instructions before trying to make the program! 10 | ; 11 | ; 12 | ; * * * Output file * * * 13 | libjpeg.lib 14 | ; 15 | ; * * * COMPILER OPTIONS * * * 16 | .C[-P] ; absolute calls 17 | .C[-M] ; and no string merging, folks 18 | .C[-w-cln] ; no "constant is long" warnings 19 | .C[-w-par] ; no "parameter xxxx unused" 20 | .C[-w-rch] ; no "unreachable code" 21 | .C[-wsig] ; warn if significant digits may be lost 22 | .L[-J] ; link new Obj-format (so we get a library) 23 | = 24 | ; * * * * List of modules * * * * 25 | jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 26 | jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 27 | jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 28 | jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 29 | jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 30 | jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) 31 | jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 32 | jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 33 | jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 34 | jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 35 | jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 36 | jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 37 | jcphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) 38 | jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 39 | jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 40 | jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 41 | jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 42 | jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 43 | jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) 44 | jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) 45 | jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 46 | jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 47 | jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 48 | jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) 49 | jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 50 | jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 51 | jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 52 | jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 53 | jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 54 | jdphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) 55 | jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 56 | jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 57 | jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 58 | jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h) 59 | jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 60 | jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 61 | jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 62 | jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 63 | jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 64 | jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 65 | jidctred.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) 66 | jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 67 | jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 68 | jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) 69 | jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) 70 | jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) 71 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/maktjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to jpegtran.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | jpegtran.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h) 30 | libjpeg.lib ; built by libjpeg.prj 31 | pcstdlib.lib ; standard library 32 | pcextlib.lib ; extended library 33 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/makvms.opt: -------------------------------------------------------------------------------- 1 | ! A pointer to the VAX/VMS C Run-Time Shareable Library. 2 | ! This file is needed by makefile.mms and makefile.vms, 3 | ! but only for the older VAX C compiler. DEC C does not need it. 4 | Sys$Library:VAXCRTL.EXE /Share 5 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdbmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdbmp.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdcolmap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rdcolmap.c 3 | * 4 | * Copyright (C) 1994-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file implements djpeg's "-map file" switch. It reads a source image 9 | * and constructs a colormap to be supplied to the JPEG decompressor. 10 | * 11 | * Currently, these file formats are supported for the map file: 12 | * GIF: the contents of the GIF's global colormap are used. 13 | * PPM (either text or raw flavor): the entire file is read and 14 | * each unique pixel value is entered in the map. 15 | * Note that reading a large PPM file will be horrendously slow. 16 | * Typically, a PPM-format map file should contain just one pixel 17 | * of each desired color. Such a file can be extracted from an 18 | * ordinary image PPM file with ppmtomap(1). 19 | * 20 | * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not 21 | * currently implemented. 22 | */ 23 | 24 | #include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ 25 | 26 | #ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ 27 | 28 | /* Portions of this code are based on the PBMPLUS library, which is: 29 | ** 30 | ** Copyright (C) 1988 by Jef Poskanzer. 31 | ** 32 | ** Permission to use, copy, modify, and distribute this software and its 33 | ** documentation for any purpose and without fee is hereby granted, provided 34 | ** that the above copyright notice appear in all copies and that both that 35 | ** copyright notice and this permission notice appear in supporting 36 | ** documentation. This software is provided "as is" without express or 37 | ** implied warranty. 38 | */ 39 | 40 | 41 | /* 42 | * Add a (potentially) new color to the color map. 43 | */ 44 | 45 | LOCAL(void) 46 | add_map_entry (j_decompress_ptr cinfo, int R, int G, int B) 47 | { 48 | JSAMPROW colormap0 = cinfo->colormap[0]; 49 | JSAMPROW colormap1 = cinfo->colormap[1]; 50 | JSAMPROW colormap2 = cinfo->colormap[2]; 51 | int ncolors = cinfo->actual_number_of_colors; 52 | int index; 53 | 54 | /* Check for duplicate color. */ 55 | for (index = 0; index < ncolors; index++) { 56 | if (GETJSAMPLE(colormap0[index]) == R && 57 | GETJSAMPLE(colormap1[index]) == G && 58 | GETJSAMPLE(colormap2[index]) == B) 59 | return; /* color is already in map */ 60 | } 61 | 62 | /* Check for map overflow. */ 63 | if (ncolors >= (MAXJSAMPLE+1)) 64 | ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1)); 65 | 66 | /* OK, add color to map. */ 67 | colormap0[ncolors] = (JSAMPLE) R; 68 | colormap1[ncolors] = (JSAMPLE) G; 69 | colormap2[ncolors] = (JSAMPLE) B; 70 | cinfo->actual_number_of_colors++; 71 | } 72 | 73 | 74 | /* 75 | * Extract color map from a GIF file. 76 | */ 77 | 78 | LOCAL(void) 79 | read_gif_map (j_decompress_ptr cinfo, FILE * infile) 80 | { 81 | int header[13]; 82 | int i, colormaplen; 83 | int R, G, B; 84 | 85 | /* Initial 'G' has already been read by read_color_map */ 86 | /* Read the rest of the GIF header and logical screen descriptor */ 87 | for (i = 1; i < 13; i++) { 88 | if ((header[i] = getc(infile)) == EOF) 89 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 90 | } 91 | 92 | /* Verify GIF Header */ 93 | if (header[1] != 'I' || header[2] != 'F') 94 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 95 | 96 | /* There must be a global color map. */ 97 | if ((header[10] & 0x80) == 0) 98 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 99 | 100 | /* OK, fetch it. */ 101 | colormaplen = 2 << (header[10] & 0x07); 102 | 103 | for (i = 0; i < colormaplen; i++) { 104 | R = getc(infile); 105 | G = getc(infile); 106 | B = getc(infile); 107 | if (R == EOF || G == EOF || B == EOF) 108 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 109 | add_map_entry(cinfo, 110 | R << (BITS_IN_JSAMPLE-8), 111 | G << (BITS_IN_JSAMPLE-8), 112 | B << (BITS_IN_JSAMPLE-8)); 113 | } 114 | } 115 | 116 | 117 | /* Support routines for reading PPM */ 118 | 119 | 120 | LOCAL(int) 121 | pbm_getc (FILE * infile) 122 | /* Read next char, skipping over any comments */ 123 | /* A comment/newline sequence is returned as a newline */ 124 | { 125 | register int ch; 126 | 127 | ch = getc(infile); 128 | if (ch == '#') { 129 | do { 130 | ch = getc(infile); 131 | } while (ch != '\n' && ch != EOF); 132 | } 133 | return ch; 134 | } 135 | 136 | 137 | LOCAL(unsigned int) 138 | read_pbm_integer (j_decompress_ptr cinfo, FILE * infile) 139 | /* Read an unsigned decimal integer from the PPM file */ 140 | /* Swallows one trailing character after the integer */ 141 | /* Note that on a 16-bit-int machine, only values up to 64k can be read. */ 142 | /* This should not be a problem in practice. */ 143 | { 144 | register int ch; 145 | register unsigned int val; 146 | 147 | /* Skip any leading whitespace */ 148 | do { 149 | ch = pbm_getc(infile); 150 | if (ch == EOF) 151 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 152 | } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); 153 | 154 | if (ch < '0' || ch > '9') 155 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 156 | 157 | val = ch - '0'; 158 | while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { 159 | val *= 10; 160 | val += ch - '0'; 161 | } 162 | return val; 163 | } 164 | 165 | 166 | /* 167 | * Extract color map from a PPM file. 168 | */ 169 | 170 | LOCAL(void) 171 | read_ppm_map (j_decompress_ptr cinfo, FILE * infile) 172 | { 173 | int c; 174 | unsigned int w, h, maxval, row, col; 175 | int R, G, B; 176 | 177 | /* Initial 'P' has already been read by read_color_map */ 178 | c = getc(infile); /* save format discriminator for a sec */ 179 | 180 | /* while we fetch the remaining header info */ 181 | w = read_pbm_integer(cinfo, infile); 182 | h = read_pbm_integer(cinfo, infile); 183 | maxval = read_pbm_integer(cinfo, infile); 184 | 185 | if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ 186 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 187 | 188 | /* For now, we don't support rescaling from an unusual maxval. */ 189 | if (maxval != (unsigned int) MAXJSAMPLE) 190 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 191 | 192 | switch (c) { 193 | case '3': /* it's a text-format PPM file */ 194 | for (row = 0; row < h; row++) { 195 | for (col = 0; col < w; col++) { 196 | R = read_pbm_integer(cinfo, infile); 197 | G = read_pbm_integer(cinfo, infile); 198 | B = read_pbm_integer(cinfo, infile); 199 | add_map_entry(cinfo, R, G, B); 200 | } 201 | } 202 | break; 203 | 204 | case '6': /* it's a raw-format PPM file */ 205 | for (row = 0; row < h; row++) { 206 | for (col = 0; col < w; col++) { 207 | R = getc(infile); 208 | G = getc(infile); 209 | B = getc(infile); 210 | if (R == EOF || G == EOF || B == EOF) 211 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 212 | add_map_entry(cinfo, R, G, B); 213 | } 214 | } 215 | break; 216 | 217 | default: 218 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 219 | break; 220 | } 221 | } 222 | 223 | 224 | /* 225 | * Main entry point from djpeg.c. 226 | * Input: opened input file (from file name argument on command line). 227 | * Output: colormap and actual_number_of_colors fields are set in cinfo. 228 | */ 229 | 230 | GLOBAL(void) 231 | read_color_map (j_decompress_ptr cinfo, FILE * infile) 232 | { 233 | /* Allocate space for a color map of maximum supported size. */ 234 | cinfo->colormap = (*cinfo->mem->alloc_sarray) 235 | ((j_common_ptr) cinfo, JPOOL_IMAGE, 236 | (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3); 237 | cinfo->actual_number_of_colors = 0; /* initialize map to empty */ 238 | 239 | /* Read first byte to determine file format */ 240 | switch (getc(infile)) { 241 | case 'G': 242 | read_gif_map(cinfo, infile); 243 | break; 244 | case 'P': 245 | read_ppm_map(cinfo, infile); 246 | break; 247 | default: 248 | ERREXIT(cinfo, JERR_BAD_CMAP_FILE); 249 | break; 250 | } 251 | } 252 | 253 | #endif /* QUANT_2PASS_SUPPORTED */ 254 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdcolmap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdcolmap.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdgif.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rdgif.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains routines to read input images in GIF format. 9 | * 10 | ***************************************************************************** 11 | * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * 12 | * the ability to read GIF files has been removed from the IJG distribution. * 13 | * Sorry about that. * 14 | ***************************************************************************** 15 | * 16 | * We are required to state that 17 | * "The Graphics Interchange Format(c) is the Copyright property of 18 | * CompuServe Incorporated. GIF(sm) is a Service Mark property of 19 | * CompuServe Incorporated." 20 | */ 21 | 22 | #include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ 23 | 24 | #ifdef GIF_SUPPORTED 25 | 26 | /* 27 | * The module selection routine for GIF format input. 28 | */ 29 | 30 | GLOBAL(cjpeg_source_ptr) 31 | jinit_read_gif (j_compress_ptr cinfo) 32 | { 33 | fprintf(stderr, "GIF input is unsupported for legal reasons. Sorry.\n"); 34 | exit(EXIT_FAILURE); 35 | return NULL; /* keep compiler happy */ 36 | } 37 | 38 | #endif /* GIF_SUPPORTED */ 39 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdgif.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdgif.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdjpgcom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdjpgcom -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdjpgcom.1: -------------------------------------------------------------------------------- 1 | .TH RDJPGCOM 1 "11 October 1997" 2 | .SH NAME 3 | rdjpgcom \- display text comments from a JPEG file 4 | .SH SYNOPSIS 5 | .B rdjpgcom 6 | [ 7 | .B \-verbose 8 | ] 9 | [ 10 | .I filename 11 | ] 12 | .LP 13 | .SH DESCRIPTION 14 | .LP 15 | .B rdjpgcom 16 | reads the named JPEG/JFIF file, or the standard input if no file is named, 17 | and prints any text comments found in the file on the standard output. 18 | .PP 19 | The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. 20 | Although the standard doesn't actually define what COM blocks are for, they 21 | are widely used to hold user-supplied text strings. This lets you add 22 | annotations, titles, index terms, etc to your JPEG files, and later retrieve 23 | them as text. COM blocks do not interfere with the image stored in the JPEG 24 | file. The maximum size of a COM block is 64K, but you can have as many of 25 | them as you like in one JPEG file. 26 | .SH OPTIONS 27 | .TP 28 | .B \-verbose 29 | Causes 30 | .B rdjpgcom 31 | to also display the JPEG image dimensions. 32 | .PP 33 | Switch names may be abbreviated, and are not case sensitive. 34 | .SH HINTS 35 | .B rdjpgcom 36 | does not depend on the IJG JPEG library. Its source code is intended as an 37 | illustration of the minimum amount of code required to parse a JPEG file 38 | header correctly. 39 | .PP 40 | In 41 | .B \-verbose 42 | mode, 43 | .B rdjpgcom 44 | will also attempt to print the contents of any "APP12" markers as text. 45 | Some digital cameras produce APP12 markers containing useful textual 46 | information. If you like, you can modify the source code to print 47 | other APPn marker types as well. 48 | .SH SEE ALSO 49 | .BR cjpeg (1), 50 | .BR djpeg (1), 51 | .BR jpegtran (1), 52 | .BR wrjpgcom (1) 53 | .SH AUTHOR 54 | Independent JPEG Group 55 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdjpgcom.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdjpgcom.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdppm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdppm.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdrle.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdrle.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdswitch.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdswitch.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/rdtarga.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/rdtarga.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/testimg.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/testimg.bmp -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/testimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/testimg.jpg -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/testimg.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/testimg.ppm -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/testimgp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/testimgp.jpg -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/testorig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/testorig.jpg -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/testprog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/testprog.jpg -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/transupp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * transupp.h 3 | * 4 | * Copyright (C) 1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains declarations for image transformation routines and 9 | * other utility code used by the jpegtran sample application. These are 10 | * NOT part of the core JPEG library. But we keep these routines separate 11 | * from jpegtran.c to ease the task of maintaining jpegtran-like programs 12 | * that have other user interfaces. 13 | * 14 | * NOTE: all the routines declared here have very specific requirements 15 | * about when they are to be executed during the reading and writing of the 16 | * source and destination files. See the comments in transupp.c, or see 17 | * jpegtran.c for an example of correct usage. 18 | */ 19 | 20 | /* If you happen not to want the image transform support, disable it here */ 21 | #ifndef TRANSFORMS_SUPPORTED 22 | #define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ 23 | #endif 24 | 25 | /* Short forms of external names for systems with brain-damaged linkers. */ 26 | 27 | #ifdef NEED_SHORT_EXTERNAL_NAMES 28 | #define jtransform_request_workspace jTrRequest 29 | #define jtransform_adjust_parameters jTrAdjust 30 | #define jtransform_execute_transformation jTrExec 31 | #define jcopy_markers_setup jCMrkSetup 32 | #define jcopy_markers_execute jCMrkExec 33 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 34 | 35 | 36 | /* 37 | * Codes for supported types of image transformations. 38 | */ 39 | 40 | typedef enum { 41 | JXFORM_NONE, /* no transformation */ 42 | JXFORM_FLIP_H, /* horizontal flip */ 43 | JXFORM_FLIP_V, /* vertical flip */ 44 | JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ 45 | JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ 46 | JXFORM_ROT_90, /* 90-degree clockwise rotation */ 47 | JXFORM_ROT_180, /* 180-degree rotation */ 48 | JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ 49 | } JXFORM_CODE; 50 | 51 | /* 52 | * Although rotating and flipping data expressed as DCT coefficients is not 53 | * hard, there is an asymmetry in the JPEG format specification for images 54 | * whose dimensions aren't multiples of the iMCU size. The right and bottom 55 | * image edges are padded out to the next iMCU boundary with junk data; but 56 | * no padding is possible at the top and left edges. If we were to flip 57 | * the whole image including the pad data, then pad garbage would become 58 | * visible at the top and/or left, and real pixels would disappear into the 59 | * pad margins --- perhaps permanently, since encoders & decoders may not 60 | * bother to preserve DCT blocks that appear to be completely outside the 61 | * nominal image area. So, we have to exclude any partial iMCUs from the 62 | * basic transformation. 63 | * 64 | * Transpose is the only transformation that can handle partial iMCUs at the 65 | * right and bottom edges completely cleanly. flip_h can flip partial iMCUs 66 | * at the bottom, but leaves any partial iMCUs at the right edge untouched. 67 | * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. 68 | * The other transforms are defined as combinations of these basic transforms 69 | * and process edge blocks in a way that preserves the equivalence. 70 | * 71 | * The "trim" option causes untransformable partial iMCUs to be dropped; 72 | * this is not strictly lossless, but it usually gives the best-looking 73 | * result for odd-size images. Note that when this option is active, 74 | * the expected mathematical equivalences between the transforms may not hold. 75 | * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim 76 | * followed by -rot 180 -trim trims both edges.) 77 | * 78 | * We also offer a "force to grayscale" option, which simply discards the 79 | * chrominance channels of a YCbCr image. This is lossless in the sense that 80 | * the luminance channel is preserved exactly. It's not the same kind of 81 | * thing as the rotate/flip transformations, but it's convenient to handle it 82 | * as part of this package, mainly because the transformation routines have to 83 | * be aware of the option to know how many components to work on. 84 | */ 85 | 86 | typedef struct { 87 | /* Options: set by caller */ 88 | JXFORM_CODE transform; /* image transform operator */ 89 | boolean trim; /* if TRUE, trim partial MCUs as needed */ 90 | boolean force_grayscale; /* if TRUE, convert color image to grayscale */ 91 | 92 | /* Internal workspace: caller should not touch these */ 93 | int num_components; /* # of components in workspace */ 94 | jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ 95 | } jpeg_transform_info; 96 | 97 | 98 | #if TRANSFORMS_SUPPORTED 99 | 100 | /* Request any required workspace */ 101 | EXTERN(void) jtransform_request_workspace 102 | JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); 103 | /* Adjust output image parameters */ 104 | EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters 105 | JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, 106 | jvirt_barray_ptr *src_coef_arrays, 107 | jpeg_transform_info *info)); 108 | /* Execute the actual transformation, if any */ 109 | EXTERN(void) jtransform_execute_transformation 110 | JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, 111 | jvirt_barray_ptr *src_coef_arrays, 112 | jpeg_transform_info *info)); 113 | 114 | #endif /* TRANSFORMS_SUPPORTED */ 115 | 116 | 117 | /* 118 | * Support for copying optional markers from source to destination file. 119 | */ 120 | 121 | typedef enum { 122 | JCOPYOPT_NONE, /* copy no optional markers */ 123 | JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ 124 | JCOPYOPT_ALL /* copy all optional markers */ 125 | } JCOPY_OPTION; 126 | 127 | #define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ 128 | 129 | /* Setup decompression object to save desired markers in memory */ 130 | EXTERN(void) jcopy_markers_setup 131 | JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); 132 | /* Copy markers saved in the given source object to the destination object */ 133 | EXTERN(void) jcopy_markers_execute 134 | JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, 135 | JCOPY_OPTION option)); 136 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/transupp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/transupp.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrbmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/wrbmp.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrgif.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/wrgif.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrjpgcom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/wrjpgcom -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrjpgcom.1: -------------------------------------------------------------------------------- 1 | .TH WRJPGCOM 1 "15 June 1995" 2 | .SH NAME 3 | wrjpgcom \- insert text comments into a JPEG file 4 | .SH SYNOPSIS 5 | .B wrjpgcom 6 | [ 7 | .B \-replace 8 | ] 9 | [ 10 | .BI \-comment " text" 11 | ] 12 | [ 13 | .BI \-cfile " name" 14 | ] 15 | [ 16 | .I filename 17 | ] 18 | .LP 19 | .SH DESCRIPTION 20 | .LP 21 | .B wrjpgcom 22 | reads the named JPEG/JFIF file, or the standard input if no file is named, 23 | and generates a new JPEG/JFIF file on standard output. A comment block is 24 | added to the file. 25 | .PP 26 | The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. 27 | Although the standard doesn't actually define what COM blocks are for, they 28 | are widely used to hold user-supplied text strings. This lets you add 29 | annotations, titles, index terms, etc to your JPEG files, and later retrieve 30 | them as text. COM blocks do not interfere with the image stored in the JPEG 31 | file. The maximum size of a COM block is 64K, but you can have as many of 32 | them as you like in one JPEG file. 33 | .PP 34 | .B wrjpgcom 35 | adds a COM block, containing text you provide, to a JPEG file. 36 | Ordinarily, the COM block is added after any existing COM blocks; but you 37 | can delete the old COM blocks if you wish. 38 | .SH OPTIONS 39 | Switch names may be abbreviated, and are not case sensitive. 40 | .TP 41 | .B \-replace 42 | Delete any existing COM blocks from the file. 43 | .TP 44 | .BI \-comment " text" 45 | Supply text for new COM block on command line. 46 | .TP 47 | .BI \-cfile " name" 48 | Read text for new COM block from named file. 49 | .PP 50 | If you have only one line of comment text to add, you can provide it on the 51 | command line with 52 | .BR \-comment . 53 | The comment text must be surrounded with quotes so that it is treated as a 54 | single argument. Longer comments can be read from a text file. 55 | .PP 56 | If you give neither 57 | .B \-comment 58 | nor 59 | .BR \-cfile , 60 | then 61 | .B wrjpgcom 62 | will read the comment text from standard input. (In this case an input image 63 | file name MUST be supplied, so that the source JPEG file comes from somewhere 64 | else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file 65 | indicator (usually control-D) to terminate the comment text entry. 66 | .PP 67 | .B wrjpgcom 68 | will not add a COM block if the provided comment string is empty. Therefore 69 | \fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file. 70 | .SH EXAMPLES 71 | .LP 72 | Add a short comment to in.jpg, producing out.jpg: 73 | .IP 74 | .B wrjpgcom \-c 75 | \fI"View of my back yard" in.jpg 76 | .B > 77 | .I out.jpg 78 | .PP 79 | Attach a long comment previously stored in comment.txt: 80 | .IP 81 | .B wrjpgcom 82 | .I in.jpg 83 | .B < 84 | .I comment.txt 85 | .B > 86 | .I out.jpg 87 | .PP 88 | or equivalently 89 | .IP 90 | .B wrjpgcom 91 | .B -cfile 92 | .I comment.txt 93 | .B < 94 | .I in.jpg 95 | .B > 96 | .I out.jpg 97 | .SH SEE ALSO 98 | .BR cjpeg (1), 99 | .BR djpeg (1), 100 | .BR jpegtran (1), 101 | .BR rdjpgcom (1) 102 | .SH AUTHOR 103 | Independent JPEG Group 104 | -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrjpgcom.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/wrjpgcom.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrppm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/wrppm.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrrle.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/wrrle.o -------------------------------------------------------------------------------- /lib/jpeg-6b-arm/wrtarga.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/jpeg-6b-arm/wrtarga.o -------------------------------------------------------------------------------- /lib/libg711/Makefile: -------------------------------------------------------------------------------- 1 | EXENAME = libg711.a 2 | 3 | CC = arm-linux-gcc 4 | AR= arm-linux-ar rc 5 | CFLAGS = 6 | INCLUDE = 7 | LIBS = 8 | DEP_LIBS = 9 | HEADER = 10 | OBJS = g711core.o 11 | 12 | all: $(EXENAME) 13 | cp $(EXENAME) ../bin 14 | .c.o: 15 | $(CC) -c $(CFLAGS) $(INCLUDE) $< 16 | 17 | $(EXENAME): $(OBJS) 18 | # $(CC) -o $(EXENAME) $(OBJS) $(LIBS) $(DEP_LIBS) 19 | $(AR) $(EXENAME) $(OBJS) $(LIBS) $(DEP_LIBS) 20 | clean: 21 | rm -f *.o a.out $(EXENAME) core *~ 22 | -------------------------------------------------------------------------------- /lib/libg711/g711core.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source code is a product of Sun Microsystems, Inc. and is provided 3 | * for unrestricted use. Users may copy or modify this source code without 4 | * charge. 5 | * 6 | * SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING 7 | * THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 8 | * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 9 | * 10 | * Sun source code is provided with no support and without any obligation on 11 | * the part of Sun Microsystems, Inc. to assist in its use, correction, 12 | * modification or enhancement. 13 | * 14 | * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 15 | * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE 16 | * OR ANY PART THEREOF. 17 | * 18 | * In no event will Sun Microsystems, Inc. be liable for any lost revenue 19 | * or profits or other special, indirect and consequential damages, even if 20 | * Sun has been advised of the possibility of such damages. 21 | * 22 | * Sun Microsystems, Inc. 23 | * 2550 Garcia Avenue 24 | * Mountain View, California 94043 25 | */ 26 | 27 | /* 28 | * g711.h 29 | * 30 | * u-law, A-law and linear PCM conversions. 31 | */ 32 | 33 | #ifndef G711_H 34 | #define G711_H 35 | 36 | /* 37 | * linear2alaw() - Convert a 16-bit linear PCM value to 8-bit A-law 38 | * 39 | * linear2alaw() accepts an 16-bit integer and encodes it as A-law data. 40 | * 41 | * Linear Input Code Compressed Code 42 | * ------------------------ --------------- 43 | * 0000000wxyza 000wxyz 44 | * 0000001wxyza 001wxyz 45 | * 000001wxyzab 010wxyz 46 | * 00001wxyzabc 011wxyz 47 | * 0001wxyzabcd 100wxyz 48 | * 001wxyzabcde 101wxyz 49 | * 01wxyzabcdef 110wxyz 50 | * 1wxyzabcdefg 111wxyz 51 | * 52 | * For further information see John C. Bellamy's Digital Telephony, 1982, 53 | * John Wiley & Sons, pps 98-111 and 472-476. 54 | */ 55 | 56 | /* pcm_val is 2's complement (16-bit range) */ 57 | unsigned char _af_linear2alaw (short pcm_val); 58 | 59 | /* 60 | * alaw2linear() - Convert an A-law value to 16-bit linear PCM 61 | * 62 | */ 63 | 64 | short _af_alaw2linear (unsigned char a_val); 65 | 66 | /* 67 | * linear2ulaw() - Convert a linear PCM value to u-law 68 | * 69 | * In order to simplify the encoding process, the original linear magnitude 70 | * is biased by adding 33 which shifts the encoding range from (0 - 8158) to 71 | * (33 - 8191). The result can be seen in the following encoding table: 72 | * 73 | * Biased Linear Input Code Compressed Code 74 | * ------------------------ --------------- 75 | * 00000001wxyza 000wxyz 76 | * 0000001wxyzab 001wxyz 77 | * 000001wxyzabc 010wxyz 78 | * 00001wxyzabcd 011wxyz 79 | * 0001wxyzabcde 100wxyz 80 | * 001wxyzabcdef 101wxyz 81 | * 01wxyzabcdefg 110wxyz 82 | * 1wxyzabcdefgh 111wxyz 83 | * 84 | * Each biased linear code has a leading 1 which identifies the segment 85 | * number. The value of the segment number is equal to 7 minus the number 86 | * of leading 0's. The quantization interval is directly available as the 87 | * four bits wxyz. * The trailing bits (a - h) are ignored. 88 | * 89 | * Ordinarily the complement of the resulting code word is used for 90 | * transmission, and so the code word is complemented before it is returned. 91 | * 92 | * For further information see John C. Bellamy's Digital Telephony, 1982, 93 | * John Wiley & Sons, pps 98-111 and 472-476. 94 | */ 95 | 96 | /* pcm_val is 2's complement (16-bit range) */ 97 | unsigned char _af_linear2ulaw (short pcm_val); 98 | 99 | /* 100 | * ulaw2linear() - Convert a u-law value to 16-bit linear PCM 101 | * 102 | * First, a biased linear code is derived from the code word. An unbiased 103 | * output can then be obtained by subtracting 33 from the biased code. 104 | * 105 | * Note that this function expects to be passed the complement of the 106 | * original code word. This is in keeping with ISDN conventions. 107 | */ 108 | 109 | short _af_ulaw2linear (unsigned char u_val); 110 | 111 | void G711Encoder(short *pcm,unsigned char *code,int size,int lawflag); 112 | void G711Decoder(short *pcm,unsigned char *code,int size,int lawflag); 113 | 114 | 115 | #endif /* G711_H */ 116 | -------------------------------------------------------------------------------- /lib/libimage/Makefile: -------------------------------------------------------------------------------- 1 | EXENAME = libimage.a 2 | 3 | CC = arm-linux-gcc 4 | AR= arm-linux-ar rc 5 | CFLAGS = 6 | INCLUDE = 7 | LIBS = 8 | DEP_LIBS = 9 | HEADER = 10 | OBJS = image.o 11 | 12 | all: $(EXENAME) 13 | cp $(EXENAME) ../bin 14 | .c.o: 15 | $(CC) -c $(CFLAGS) $(INCLUDE) $< 16 | 17 | $(EXENAME): $(OBJS) 18 | # $(CC) -o $(EXENAME) $(OBJS) $(LIBS) $(DEP_LIBS) 19 | $(AR) $(EXENAME) $(OBJS) $(LIBS) $(DEP_LIBS) 20 | clean: 21 | rm -f *.o a.out $(EXENAME) core *~ 22 | -------------------------------------------------------------------------------- /lib/libimage/image.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/libimage/image.c -------------------------------------------------------------------------------- /lib/libimage/image.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/libimage/image.h -------------------------------------------------------------------------------- /lib/libyuv/Makefile: -------------------------------------------------------------------------------- 1 | EXENAME = libyuv.a 2 | 3 | CC = arm-linux-gcc 4 | AR= arm-linux-ar rc 5 | CFLAGS = 6 | INCLUDE = -I/home/qte/jpeg-6b-arm 7 | LIBS = 8 | DEP_LIBS = 9 | #libjpeg.a 10 | HEADER = 11 | OBJS = yuv2rgb.o jpeglib.o jpegutils.o 12 | 13 | all: $(EXENAME) 14 | cp $(EXENAME) ../bin 15 | 16 | .c.o: 17 | $(CC) -c $(CFLAGS) $(INCLUDE) $< 18 | 19 | $(EXENAME): $(OBJS) 20 | # $(CC) -o $(EXENAME) $(OBJS) $(LIBS) $(DEP_LIBS) 21 | $(AR) $(EXENAME) $(OBJS) $(LIBS) $(DEP_LIBS) 22 | 23 | clean: 24 | rm -f *.o a.out $(EXENAME) core *~ 25 | -------------------------------------------------------------------------------- /lib/libyuv/jpeglib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/libyuv/jpeglib.c -------------------------------------------------------------------------------- /lib/libyuv/jpegutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jpegutils.h: Some Utility programs for dealing with 3 | * JPEG encoded images 4 | * 5 | * Copyright (C) 1999 Rainer Johanni 6 | * Copyright (C) 2001 pHilipp Zabel 7 | * 8 | * based on jdatasrc.c and jdatadst.c from the Independent 9 | * JPEG Group's software by Thomas G. Lane 10 | * 11 | * This program is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU General Public License 13 | * as published by the Free Software Foundation; either version 2 14 | * of the License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | */ 25 | #ifndef __JPEGUTILS_H__ 26 | #define __JPEGUTILS_H__ 27 | 28 | /* 29 | * jpeg_data: buffer with input / output jpeg 30 | * len: Length of jpeg buffer 31 | * itype: Y4M_ILACE_NONE: Not interlaced 32 | * Y4M_ILACE_TOP_FIRST: Interlaced, top-field-first 33 | * Y4M_ILACE_BOTTOM_FIRST: Interlaced, bottom-field-first 34 | * ctype Chroma format for decompression. 35 | * Currently always 420 and hence ignored. 36 | * raw0 buffer with input / output raw Y channel 37 | * raw1 buffer with input / output raw U/Cb channel 38 | * raw2 buffer with input / output raw V/Cr channel 39 | * width width of Y channel (width of U/V is width/2) 40 | * height height of Y channel (height of U/V is height/2) 41 | */ 42 | 43 | int decode_jpeg_raw (unsigned char *jpeg_data, int len, 44 | int itype, int ctype, int width, int height, 45 | unsigned char *raw0, unsigned char *raw1, 46 | unsigned char *raw2); 47 | int decode_jpeg_gray_raw (unsigned char *jpeg_data, int len, 48 | int itype, int ctype, int width, int height, 49 | unsigned char *raw0, unsigned char *raw1, 50 | unsigned char *raw2); 51 | int encode_jpeg_raw (unsigned char *jpeg_data, int len, int quality, 52 | int itype, int ctype, int width, int height, 53 | unsigned char *raw0, unsigned char *raw1, 54 | unsigned char *raw2); 55 | /* 56 | void jpeg_skip_ff (j_decompress_ptr cinfo); 57 | */ 58 | #endif 59 | -------------------------------------------------------------------------------- /lib/libyuv/yuv2rgb.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/lib/libyuv/yuv2rgb.c -------------------------------------------------------------------------------- /liba/libg711.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/liba/libg711.a -------------------------------------------------------------------------------- /liba/libimage.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/liba/libimage.a -------------------------------------------------------------------------------- /liba/libjpeg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/liba/libjpeg.a -------------------------------------------------------------------------------- /liba/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/liba/libyuv.a -------------------------------------------------------------------------------- /mtd/CVS/Entries: -------------------------------------------------------------------------------- 1 | /inftl-user.h/1.1.1.1/Wed Aug 30 03:16:23 2006// 2 | /jffs2-user.h/1.1.1.1/Wed Aug 30 03:16:23 2006// 3 | /mtd-abi.h/1.1.1.1/Wed Aug 30 03:16:23 2006// 4 | /mtd-user.h/1.1.1.1/Wed Aug 30 03:16:23 2006// 5 | /nftl-user.h/1.1.1.1/Wed Aug 30 03:16:23 2006// 6 | D 7 | -------------------------------------------------------------------------------- /mtd/CVS/Repository: -------------------------------------------------------------------------------- 1 | arm-linux/user/mtd-utils/include/mtd 2 | -------------------------------------------------------------------------------- /mtd/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:herenlin@pegasus:/usr/local/cvsroot/mbu 2 | -------------------------------------------------------------------------------- /mtd/inftl-user.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: inftl-user.h,v 1.1.1.1 2006/08/30 03:16:23 ivan Exp $ 3 | * 4 | * Parts of INFTL headers shared with userspace 5 | * 6 | */ 7 | 8 | #ifndef __MTD_INFTL_USER_H__ 9 | #define __MTD_INFTL_USER_H__ 10 | 11 | #define OSAK_VERSION 0x5120 12 | #define PERCENTUSED 98 13 | 14 | #define SECTORSIZE 512 15 | 16 | /* Block Control Information */ 17 | 18 | struct inftl_bci { 19 | uint8_t ECCsig[6]; 20 | uint8_t Status; 21 | uint8_t Status1; 22 | } __attribute__((packed)); 23 | 24 | struct inftl_unithead1 { 25 | uint16_t virtualUnitNo; 26 | uint16_t prevUnitNo; 27 | uint8_t ANAC; 28 | uint8_t NACs; 29 | uint8_t parityPerField; 30 | uint8_t discarded; 31 | } __attribute__((packed)); 32 | 33 | struct inftl_unithead2 { 34 | uint8_t parityPerField; 35 | uint8_t ANAC; 36 | uint16_t prevUnitNo; 37 | uint16_t virtualUnitNo; 38 | uint8_t NACs; 39 | uint8_t discarded; 40 | } __attribute__((packed)); 41 | 42 | struct inftl_unittail { 43 | uint8_t Reserved[4]; 44 | uint16_t EraseMark; 45 | uint16_t EraseMark1; 46 | } __attribute__((packed)); 47 | 48 | union inftl_uci { 49 | struct inftl_unithead1 a; 50 | struct inftl_unithead2 b; 51 | struct inftl_unittail c; 52 | }; 53 | 54 | struct inftl_oob { 55 | struct inftl_bci b; 56 | union inftl_uci u; 57 | }; 58 | 59 | 60 | /* INFTL Media Header */ 61 | 62 | struct INFTLPartition { 63 | __u32 virtualUnits; 64 | __u32 firstUnit; 65 | __u32 lastUnit; 66 | __u32 flags; 67 | __u32 spareUnits; 68 | __u32 Reserved0; 69 | __u32 Reserved1; 70 | } __attribute__((packed)); 71 | 72 | struct INFTLMediaHeader { 73 | char bootRecordID[8]; 74 | __u32 NoOfBootImageBlocks; 75 | __u32 NoOfBinaryPartitions; 76 | __u32 NoOfBDTLPartitions; 77 | __u32 BlockMultiplierBits; 78 | __u32 FormatFlags; 79 | __u32 OsakVersion; 80 | __u32 PercentUsed; 81 | struct INFTLPartition Partitions[4]; 82 | } __attribute__((packed)); 83 | 84 | /* Partition flag types */ 85 | #define INFTL_BINARY 0x20000000 86 | #define INFTL_BDTL 0x40000000 87 | #define INFTL_LAST 0x80000000 88 | 89 | #endif /* __MTD_INFTL_USER_H__ */ 90 | 91 | 92 | -------------------------------------------------------------------------------- /mtd/jffs2-user.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: jffs2-user.h,v 1.1.1.1 2006/08/30 03:16:23 ivan Exp $ 3 | * 4 | * JFFS2 definitions for use in user space only 5 | */ 6 | 7 | #ifndef __JFFS2_USER_H__ 8 | #define __JFFS2_USER_H__ 9 | 10 | /* This file is blessed for inclusion by userspace */ 11 | #include 12 | #include 13 | #include 14 | 15 | #undef cpu_to_je16 16 | #undef cpu_to_je32 17 | #undef cpu_to_jemode 18 | #undef je16_to_cpu 19 | #undef je32_to_cpu 20 | #undef jemode_to_cpu 21 | 22 | extern int target_endian; 23 | 24 | #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) 25 | #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) 26 | 27 | #define cpu_to_je16(x) ((jint16_t){t16(x)}) 28 | #define cpu_to_je32(x) ((jint32_t){t32(x)}) 29 | #define cpu_to_jemode(x) ((jmode_t){t32(x)}) 30 | 31 | #define je16_to_cpu(x) (t16((x).v16)) 32 | #define je32_to_cpu(x) (t32((x).v32)) 33 | #define jemode_to_cpu(x) (t32((x).m)) 34 | 35 | #endif /* __JFFS2_USER_H__ */ 36 | -------------------------------------------------------------------------------- /mtd/mtd-abi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: mtd-abi.h,v 1.1.1.1 2006/08/30 03:16:23 ivan Exp $ 3 | * 4 | * Portions of MTD ABI definition which are shared by kernel and user space 5 | */ 6 | 7 | #ifndef __MTD_ABI_H__ 8 | #define __MTD_ABI_H__ 9 | 10 | #ifndef __KERNEL__ /* Urgh. The whole point of splitting this out into 11 | separate files was to avoid #ifdef __KERNEL__ */ 12 | #define __user 13 | #endif 14 | 15 | struct erase_info_user { 16 | uint32_t start; 17 | uint32_t length; 18 | }; 19 | 20 | struct mtd_oob_buf { 21 | uint32_t start; 22 | uint32_t length; 23 | unsigned char __user *ptr; 24 | }; 25 | 26 | #define MTD_ABSENT 0 27 | #define MTD_RAM 1 28 | #define MTD_ROM 2 29 | #define MTD_NORFLASH 3 30 | #define MTD_NANDFLASH 4 31 | #define MTD_PEROM 5 32 | #define MTD_OTHER 14 33 | #define MTD_UNKNOWN 15 34 | 35 | #define MTD_CLEAR_BITS 1 // Bits can be cleared (flash) 36 | #define MTD_SET_BITS 2 // Bits can be set 37 | #define MTD_ERASEABLE 4 // Has an erase function 38 | #define MTD_WRITEB_WRITEABLE 8 // Direct IO is possible 39 | #define MTD_VOLATILE 16 // Set for RAMs 40 | #define MTD_XIP 32 // eXecute-In-Place possible 41 | #define MTD_OOB 64 // Out-of-band data (NAND flash) 42 | #define MTD_ECC 128 // Device capable of automatic ECC 43 | 44 | // Some common devices / combinations of capabilities 45 | #define MTD_CAP_ROM 0 46 | #define MTD_CAP_RAM (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEB_WRITEABLE) 47 | #define MTD_CAP_NORFLASH (MTD_CLEAR_BITS|MTD_ERASEABLE) 48 | #define MTD_CAP_NANDFLASH (MTD_CLEAR_BITS|MTD_ERASEABLE|MTD_OOB) 49 | #define MTD_WRITEABLE (MTD_CLEAR_BITS|MTD_SET_BITS) 50 | 51 | 52 | // Types of automatic ECC/Checksum available 53 | #define MTD_ECC_NONE 0 // No automatic ECC available 54 | #define MTD_ECC_RS_DiskOnChip 1 // Automatic ECC on DiskOnChip 55 | #define MTD_ECC_SW 2 // SW ECC for Toshiba & Samsung devices 56 | 57 | /* ECC byte placement */ 58 | #define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) 59 | #define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode) 60 | #define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme 61 | #define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read) 62 | 63 | struct mtd_info_user { 64 | uint8_t type; 65 | uint32_t flags; 66 | uint32_t size; // Total size of the MTD 67 | uint32_t erasesize; 68 | uint32_t oobblock; // Size of OOB blocks (e.g. 512) 69 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) 70 | uint32_t ecctype; 71 | uint32_t eccsize; 72 | }; 73 | 74 | struct region_info_user { 75 | uint32_t offset; /* At which this region starts, 76 | * from the beginning of the MTD */ 77 | uint32_t erasesize; /* For this region */ 78 | uint32_t numblocks; /* Number of blocks in this region */ 79 | uint32_t regionindex; 80 | }; 81 | 82 | #define MEMGETINFO _IOR('M', 1, struct mtd_info_user) 83 | #define MEMERASE _IOW('M', 2, struct erase_info_user) 84 | #define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf) 85 | #define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf) 86 | #define MEMLOCK _IOW('M', 5, struct erase_info_user) 87 | #define MEMUNLOCK _IOW('M', 6, struct erase_info_user) 88 | #define MEMGETREGIONCOUNT _IOR('M', 7, int) 89 | #define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user) 90 | #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo) 91 | #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo) 92 | #define MEMGETBADBLOCK _IOW('M', 11, loff_t) 93 | #define MEMSETBADBLOCK _IOW('M', 12, loff_t) 94 | 95 | struct nand_oobinfo { 96 | uint32_t useecc; 97 | uint32_t eccbytes; 98 | uint32_t oobfree[8][2]; 99 | uint32_t eccpos[32]; 100 | }; 101 | 102 | #endif /* __MTD_ABI_H__ */ 103 | -------------------------------------------------------------------------------- /mtd/mtd-user.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: mtd-user.h,v 1.1.1.1 2006/08/30 03:16:23 ivan Exp $ 3 | * 4 | * MTD ABI header for use by user space only. 5 | */ 6 | 7 | #ifndef __MTD_USER_H__ 8 | #define __MTD_USER_H__ 9 | 10 | #include 11 | 12 | /* This file is blessed for inclusion by userspace */ 13 | #include "mtd-abi.h" 14 | 15 | typedef struct mtd_info_user mtd_info_t; 16 | typedef struct erase_info_user erase_info_t; 17 | typedef struct region_info_user region_info_t; 18 | typedef struct nand_oobinfo nand_oobinfo_t; 19 | 20 | #endif /* __MTD_USER_H__ */ 21 | -------------------------------------------------------------------------------- /mtd/nftl-user.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: nftl-user.h,v 1.1.1.1 2006/08/30 03:16:23 ivan Exp $ 3 | * 4 | * Parts of NFTL headers shared with userspace 5 | * 6 | */ 7 | 8 | #ifndef __MTD_NFTL_USER_H__ 9 | #define __MTD_NFTL_USER_H__ 10 | 11 | /* Block Control Information */ 12 | 13 | struct nftl_bci { 14 | unsigned char ECCSig[6]; 15 | uint8_t Status; 16 | uint8_t Status1; 17 | }__attribute__((packed)); 18 | 19 | /* Unit Control Information */ 20 | 21 | struct nftl_uci0 { 22 | uint16_t VirtUnitNum; 23 | uint16_t ReplUnitNum; 24 | uint16_t SpareVirtUnitNum; 25 | uint16_t SpareReplUnitNum; 26 | } __attribute__((packed)); 27 | 28 | struct nftl_uci1 { 29 | uint32_t WearInfo; 30 | uint16_t EraseMark; 31 | uint16_t EraseMark1; 32 | } __attribute__((packed)); 33 | 34 | struct nftl_uci2 { 35 | uint16_t FoldMark; 36 | uint16_t FoldMark1; 37 | uint32_t unused; 38 | } __attribute__((packed)); 39 | 40 | union nftl_uci { 41 | struct nftl_uci0 a; 42 | struct nftl_uci1 b; 43 | struct nftl_uci2 c; 44 | }; 45 | 46 | struct nftl_oob { 47 | struct nftl_bci b; 48 | union nftl_uci u; 49 | }; 50 | 51 | /* NFTL Media Header */ 52 | 53 | struct NFTLMediaHeader { 54 | char DataOrgID[6]; 55 | uint16_t NumEraseUnits; 56 | uint16_t FirstPhysicalEUN; 57 | uint32_t FormattedSize; 58 | unsigned char UnitSizeFactor; 59 | } __attribute__((packed)); 60 | 61 | #define MAX_ERASE_ZONES (8192 - 512) 62 | 63 | #define ERASE_MARK 0x3c69 64 | #define SECTOR_FREE 0xff 65 | #define SECTOR_USED 0x55 66 | #define SECTOR_IGNORE 0x11 67 | #define SECTOR_DELETED 0x00 68 | 69 | #define FOLD_MARK_IN_PROGRESS 0x5555 70 | 71 | #define ZONE_GOOD 0xff 72 | #define ZONE_BAD_ORIGINAL 0 73 | #define ZONE_BAD_MARKED 7 74 | 75 | 76 | #endif /* __MTD_NFTL_USER_H__ */ 77 | -------------------------------------------------------------------------------- /picture.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/picture.c -------------------------------------------------------------------------------- /ratecontrol.c: -------------------------------------------------------------------------------- 1 | /* rate control */ 2 | #include "ratecontrol.h" 3 | 4 | #define FRAMERATE_INCR 1001 5 | #define SMALL_EPS 1e-10 6 | 7 | 8 | int get_framerate(float fFrameRate) 9 | { 10 | int fincr,fbase,i; 11 | 12 | if ((fFrameRate - (int)fFrameRate) < SMALL_EPS) { 13 | fincr = 1; 14 | fbase = (int)fFrameRate; 15 | } 16 | else { 17 | fincr = FRAMERATE_INCR; 18 | fbase = (int)(FRAMERATE_INCR * fFrameRate); 19 | } 20 | if (fincr <= 0 || fbase <= 0) { 21 | fincr = 1; 22 | fbase = 25; 23 | } 24 | i = fincr; //i = pParam->fincr; 25 | while (i > 1) { 26 | if (fincr % i == 0 && fbase % i == 0) { 27 | fincr /= i; 28 | fbase /= i; 29 | i = fincr; 30 | continue; 31 | } 32 | i--; 33 | } 34 | if (fbase > 65535) { 35 | float div = (float) fbase / 65535; 36 | fbase = (int) (fbase / div); 37 | fincr = (int) (fincr / div); 38 | } 39 | if (fbase > 65535) { 40 | float div = (float) fbase / 65535; 41 | fbase = (int) (fbase / div); 42 | fincr = (int) (fincr / div); 43 | } 44 | return (fbase*1000/fincr); 45 | } 46 | 47 | 48 | void RateControlInit(RateControl * rate_control, 49 | unsigned int target_rate, 50 | unsigned int reaction_delay_factor, 51 | unsigned int averaging_period, 52 | unsigned int buffer, 53 | int framerate, 54 | int max_quant, 55 | int min_quant, 56 | unsigned int initq) 57 | { 58 | int i; 59 | rate_control->frames = 0; 60 | rate_control->total_size = 0; 61 | rate_control->framerate = (double) framerate / 1000.0; 62 | rate_control->target_rate = (int) target_rate; 63 | // rate_control->rtn_quant = get_initial_quant(target_rate); 64 | rate_control->rtn_quant = initq; 65 | rate_control->max_quant = (short) max_quant; 66 | rate_control->min_quant = (short) min_quant; 67 | for (i = 0; i < 32; ++i) { 68 | rate_control->quant_error[i] = 0.0; 69 | } 70 | rate_control->target_framesize = 71 | (double) target_rate / 8.0 / rate_control->framerate; 72 | rate_control->sequence_quality = 2.0 / (double) rate_control->rtn_quant; 73 | rate_control->avg_framesize = rate_control->target_framesize; 74 | rate_control->reaction_delay_factor = (int) reaction_delay_factor; 75 | rate_control->averaging_period = (int) averaging_period; 76 | rate_control->buffer = (int) buffer; 77 | } 78 | 79 | 80 | void RateControlUpdate(RateControl *rate_control, 81 | short quant, 82 | int frame_size, 83 | int keyframe) 84 | { 85 | long long deviation; 86 | double overflow, averaging_period, reaction_delay_factor; 87 | double quality_scale, base_quality, target_quality; 88 | int rtn_quant; 89 | 90 | rate_control->frames++; 91 | rate_control->total_size += frame_size; 92 | 93 | deviation = 94 | (long long) ((double) rate_control->total_size - 95 | ((double) ((double) rate_control->target_rate / 8.0 / 96 | (double) rate_control->framerate) * (double) rate_control->frames)); 97 | if ((rate_control->rtn_quant <=2) && (deviation < (-rate_control->target_framesize * 80))) 98 | rate_control->total_size += (rate_control->target_framesize - frame_size); 99 | if (rate_control->rtn_quant >= 2) { 100 | averaging_period = (double) rate_control->averaging_period; 101 | rate_control->sequence_quality -= 102 | rate_control->sequence_quality / averaging_period; 103 | rate_control->sequence_quality += 104 | 2.0 / (double) rate_control->rtn_quant / averaging_period; 105 | if (rate_control->sequence_quality < 0.1) 106 | rate_control->sequence_quality = 0.1; 107 | 108 | if (!keyframe) { 109 | reaction_delay_factor = 110 | (double) rate_control->reaction_delay_factor; 111 | rate_control->avg_framesize -= 112 | rate_control->avg_framesize / reaction_delay_factor; 113 | rate_control->avg_framesize += frame_size / reaction_delay_factor; 114 | } 115 | } 116 | 117 | quality_scale = 118 | rate_control->target_framesize / rate_control->avg_framesize * 119 | rate_control->target_framesize / rate_control->avg_framesize; 120 | 121 | base_quality = rate_control->sequence_quality; 122 | if (quality_scale >= 1.0) { 123 | base_quality = 1.0 - (1.0 - base_quality) / quality_scale; 124 | } else { 125 | base_quality = 0.06452 + (base_quality - 0.06452) * quality_scale; 126 | } 127 | 128 | overflow = -((double) deviation / (double) rate_control->buffer); 129 | 130 | target_quality = 131 | base_quality + (base_quality - 132 | 0.06452) * overflow / rate_control->target_framesize; 133 | 134 | if (target_quality > 2.0) 135 | target_quality = 2.0; 136 | else if (target_quality < 0.06452) 137 | target_quality = 0.06452; 138 | 139 | rtn_quant = (int) (2.0 / target_quality); 140 | 141 | if (rtn_quant < 31) { 142 | rate_control->quant_error[rtn_quant] += 143 | 2.0 / target_quality - rtn_quant; 144 | if (rate_control->quant_error[rtn_quant] >= 1.0) { 145 | rate_control->quant_error[rtn_quant] -= 1.0; 146 | rtn_quant++; 147 | } 148 | } 149 | 150 | if (rtn_quant > rate_control->rtn_quant + 1) 151 | rtn_quant = rate_control->rtn_quant + 1; 152 | else if (rtn_quant < rate_control->rtn_quant - 1) 153 | rtn_quant = rate_control->rtn_quant - 1; 154 | 155 | if (rtn_quant > rate_control->max_quant) 156 | rtn_quant = rate_control->max_quant; 157 | else if (rtn_quant < rate_control->min_quant) 158 | rtn_quant = rate_control->min_quant; 159 | rate_control->rtn_quant = rtn_quant; 160 | } 161 | -------------------------------------------------------------------------------- /ratecontrol.h: -------------------------------------------------------------------------------- 1 | #ifndef _RATE_CONRTROL_ 2 | #define _RATE_CONRTROL_ 3 | typedef struct 4 | { 5 | int rtn_quant; 6 | long long frames; 7 | long long total_size; 8 | double framerate; 9 | int target_rate; 10 | short max_quant; 11 | short min_quant; 12 | long long last_change; 13 | long long quant_sum; 14 | double quant_error[32]; 15 | double avg_framesize; 16 | double target_framesize; 17 | double sequence_quality; 18 | int averaging_period; 19 | int reaction_delay_factor; 20 | int buffer; 21 | } 22 | RateControl; 23 | 24 | #define RC_AVERAGE_PERIOD 100 25 | #define DELAY_FACTOR 16 26 | #define ARG_RC_BUFFER 100 27 | 28 | int get_framerate(float fFrameRate); 29 | void 30 | RateControlInit(RateControl * rate_control, 31 | unsigned int target_rate, 32 | unsigned int reaction_delay_factor, 33 | unsigned int averaging_period, 34 | unsigned int buffer, 35 | int framerate, 36 | int max_quant, 37 | int min_quant, 38 | unsigned int initq); 39 | 40 | void RateControlUpdate(RateControl *rate_control, 41 | short quant, 42 | int frame_size, 43 | int keyframe); 44 | #endif -------------------------------------------------------------------------------- /setup.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/setup.c -------------------------------------------------------------------------------- /sndtools.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/sndtools.c -------------------------------------------------------------------------------- /sndtools.h: -------------------------------------------------------------------------------- 1 | #ifndef SNDTOOLS_H 2 | #define SNDTOOLS_H 3 | 4 | #include 5 | 6 | #define AUDIODSP 1 7 | #define AUDIODSP1 2 8 | 9 | #define FMT8BITS 8 10 | #define FMT16BITS 16 11 | 12 | #define FMT8K 8000 13 | #define FMT16K 16000 14 | #define FMT22K 22000 15 | #define FMT44K 44000 16 | 17 | #define MONO 0 18 | #define STERO 1 19 | 20 | #define AUDIORECBLK 512 21 | #define AUDIOPLAYBLK 512 22 | 23 | //#define AUDIOBLK 512 //ÿ֡32ms 24 | #define AUDIOBLK 128 //ÿ֡8ms 25 | #define AFRAMETIME AUDIOBLK/16 //ÿ֡ms 26 | 27 | //Open sound device, return 1 if open success 28 | //else return 0 29 | int OpenSnd(int nWhich); //1 record 2 play 30 | 31 | //Close sound device 32 | int CloseSnd(int nWhich); 33 | 34 | //Set record or playback format, return 1 if success 35 | //else return 0 36 | int SetFormat(int nWhich, int bits, int hz, int chn); 37 | 38 | //Record 39 | int Record(char *buf, int size); 40 | 41 | //Playback 42 | int Play(char *buf, int size); 43 | 44 | #endif //ifndef SNDTOOLS_H 45 | -------------------------------------------------------------------------------- /sound70.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/sound70.c -------------------------------------------------------------------------------- /talk.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/talk.c -------------------------------------------------------------------------------- /udp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/udp.c -------------------------------------------------------------------------------- /wiring.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuihouyigemeng/videotalkroom/f1c58e5594efc6239993bcb72895e3d2c2574214/wiring.c --------------------------------------------------------------------------------