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

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

?? decoder.c

?? This document aims to provide instructions on how to configure the H.264/AVC encoder and decoder usi
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*COPYRIGHT, LICENSE AND WARRANTY INFORMATIONThis software module has been originally developed by Nokia Corporation. Provided that a person, entity or a company willing to use the Software (hereinafter Licensee) comply with all the terms and conditions of this Statement and subject to the limitations set forth in this Statement Nokia grants to such Licensee a non-exclusive, sub-licensable, worldwide, limited license under copyrights owned by Nokia to use the Software for the sole purpose of creating, manufacturing, selling, marketing, or  distributing (including the right to make modifications to the Software) a fully compliant decoder implementation (hereinafter "Decoder") of ITU-T Recommendation H.264 / ISO/IEC International Standard 14496-10 and an encoder implementation producing output that is decodable with the Decoder.Nokia retains the ownership of copyrights to the Software. There is no patent nor other intellectual property right of Nokia licensed under this Statement (except the copyright license above). Licensee hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if patent licenses  are required, it is their responsibility to acquire the license before utilizing the Software.The license by Nokia is subject to that the Licensee grants to Nokia the non-exclusive, worldwide, royalty-free, perpetual and irrevocable covenant that the Licensee(s) shall not bring a suit before any court or administrative agency or otherwise assert a claim for infringement under the Licensee intellectual property rights that, but for a license, would be infringed by the Software against     (a)  Nokia or Nokia's Affiliate; or     (b)  other recipient of a license and covenant not to sue with respect         to the Software from Nokia; or    (c)  contractor, customer or distributor of a party listed above in a         or b,  which suit or claim is related to the Software or use thereof.The Licensee(s) further agrees to grant a reciprocal license to Nokia (as granted by Nokia to the Licensee(s) on the modifications made by Licensee(s) to the Software. THE SOFTWARE IS PROVIDED "AS IS" AND THE ORIGINAL DEVELOPER DISCLAIMS ANY AND ALL WARRANTIES WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. THOSE INTENDING TO USE THE SOFTWARE ARE EXPRESSLY ADVISED THAT ITS USE MAY INFRINGE EXISTING PATENTS AND BE SUBJECT TO ROYALTY PAYMENTS TO PATENT OWNERS. ANYONE USING THE SOFTWARE ON THE BASIS OF THIS LICENSE AGREES TO OBTAIN THE NECESSARY PERMISSIONS FROM ANY AND ALL APPLICABLE PATENT OWNERS FOR SUCH USE.IN NO EVENT SHALL THE ORIGINAL DEVELOPER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.This copyright, license and warranty information notice must be retained in all copies and derivative works of the Software or substantial portions thereof.*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <time.h>#include "avcdecoder.h"#define MAX_FILENAME_LEN      200#define SEPARATE_YUV_FILES    0#define COMBINED_YUV_FILE     1#define NALBUF_INITIAL_SIZE   4096#define NALBUF_BLOCK_SIZE     512#define READ_FRAME_BITS       1#define BYTE_STREAM           0#define RTP_STREAM            1typedef struct _videoFile_s {  int enabled;  int format;  FILE *y;  FILE *u;  FILE *v;  FILE *yuv;} videoFile_s;typedef struct _userParam_s {  char *inFile;  char *recoFile;  int recoFormat;  char *cumuFile;  int cropFlag;  int ecAlg;} userParam_s;typedef struct _byteStream_s {  FILE *fn;                     /* Bitstream file pointer */  long bytesRead;               /* The number of bytes read from the file */  unsigned char *bitbuf;        /* Buffer for stream bits */  int bitbufLen;                /* Size of the bit buffer in bytes */  int bitbufDataPos;  int bitbufDataLen;            /* Length of all the data in the bit buffer in bytes */  unsigned char *bitbufNalunit; /* Pointer to first NAL unit in the bitbuffer */  int bitbufNalunitLen;         /* Length of the first NAL unit in the bit buffer in bytes,                                   including variable size start code, nal head byte and the                                   RBSP payload. It will help to find the RBSP length. */} byteStream_s;typedef struct _statOverall_s {  long numBitsI;  long numBitsP;  long numIframes;  long numPframes;} statOverall_s;/* * * usage: * * Parameters: *      - * * Function: *      Print decoder usage information. * * Returns: *      - */static void usage(void){  fprintf(stderr,"Decoder parameters:\n");  fprintf(stderr," -i <bitstream filename>                  [(mandatory)]\n");  fprintf(stderr," [-reco <reconstruction filename>]        [default none]\n");  fprintf(stderr," [-recoyuv <reconstruction filename>]     [default none]\n");  fprintf(stderr," [-cumul file] Per total statistics       [default none]\n");  fprintf(stderr," [-crop]                                  [default no cropping]\n");#ifdef ERROR_CONCEALMENT  fprintf(stderr," [-ecAlg] Error Concealment Algorithm     [default TCON]\n");  fprintf(stderr,"          0: Previous Frame Copy\n");  fprintf(stderr,"          1: TCON\n");#endif}/* * * parseArg: * * Parameters: *      argc                  Number of parameters *      argv                  Parameter strings *      param                 Structure where parameters will be stored * * Function: *      Parse decoder parameters * * Returns: *      0 error *      1 ok * */static int parseArg(int argc, char **argv, userParam_s *param){  int i;  param->inFile    = NULL;  param->recoFile  = NULL;  param->cumuFile  = NULL;  param->cropFlag  = 0;  for (i = 1; i < argc; i++) {    if (strcmp(argv[i], "-i") == 0) {      if (++i == argc) {        return 0;      }      param->inFile = argv[i];    }    else if (strcmp(argv[i], "-reco") == 0) {      if (++i == argc) {        return 0;      }      param->recoFormat = SEPARATE_YUV_FILES;      param->recoFile = argv[i];    }    else if (strcmp(argv[i], "-recoyuv") == 0) {      if (++i == argc) {        return 0;      }      param->recoFormat = COMBINED_YUV_FILE;      param->recoFile = argv[i];    }    else if (strcmp(argv[i], "-cumul") == 0) {      if (++i == argc) {        return 0;      }      param->cumuFile = argv[i];    }    else if (strcmp(argv[i], "-crop") == 0) {      param->cropFlag = 1;    }    else if (strcmp(argv[i], "-ecAlg") == 0) {      if (++i == argc) {        return 0;      }      param->ecAlg = atoi(argv[i]);    }    else {      return 0;    }  }  if (param->inFile == NULL) {    fprintf(stderr, "Source file required\n\n");    return 0;  }  return 1;}/* * * printSeqStat: * * Parameters: *      seqStat               Statistics object *      qpIntra               Intra quantization parameter *      qpInter               Inter quantization parameter *      fp                    Destination stream * * Function: *      Print sequence statistics * * Returns: *      - * */static void printSeqStat(statOverall_s *seqStat,                         int qpIntra, int qpInter, FILE *fp){  long nFrames;  nFrames = seqStat->numIframes + seqStat->numPframes;  if (nFrames == 0)    return;  fprintf(fp, "%3ld %2d %2d %2.2f %2.2f %2.2f %5ld "              "%2.2f %2.2f %2.2f %5ld "              "%2.2f %2.2f %2.2f %5ld %.3f\n",    nFrames, qpInter, qpIntra,    0.0,    0.0,    0.0,    seqStat->numIframes != 0 ? seqStat->numBitsI/seqStat->numIframes : 0,    0.0,    0.0,    0.0,    seqStat->numPframes != 0 ? seqStat->numBitsP/seqStat->numPframes : 0,    0.0,    0.0,    0.0,    (seqStat->numBitsI + seqStat->numBitsP)/nFrames,    (double)clock()/CLOCKS_PER_SEC/nFrames);}/* * * openFiles: * * Parameters: *      param                 Parameters *      recoFile              Decoded sequence file *      recoFlag              If 1, dec. file opened *      strByte               Bitsream * * Function: *      Open raw video files *       * Returns: *      - * */static void openFiles(userParam_s *param, videoFile_s *recoFile,                      byteStream_s *strByte){  char tmpName[MAX_FILENAME_LEN+1];  /*   * Open reconstruction file if requested   */  if (param->recoFile != NULL && strlen(param->recoFile)+2 > MAX_FILENAME_LEN) {    fprintf(stderr, "Too long reconstruction file name\n");    exit(1);  }  recoFile->enabled = 0;  if (param->recoFile != NULL) {    switch (param->recoFormat) {          case SEPARATE_YUV_FILES:      sprintf(tmpName, "%s%s", param->recoFile, ".y");      if ((recoFile->y = fopen(tmpName, "wb")) == NULL) {        fprintf(stderr, "Cannot open reconstruction file \"%s\"\n", tmpName);        exit(1);      }      sprintf(tmpName, "%s%s", param->recoFile, ".u");      if ((recoFile->u = fopen(tmpName, "wb")) == NULL) {        fprintf(stderr, "Cannot open reconstruction file \"%s\"\n", tmpName);        exit(1);      }      sprintf(tmpName, "%s%s", param->recoFile, ".v");      if ((recoFile->v = fopen(tmpName, "wb")) == NULL) {        fprintf(stderr, "Cannot open reconstruction file \"%s\"\n", tmpName);        exit(1);      }      break;    case COMBINED_YUV_FILE:      if ((recoFile->yuv = fopen(param->recoFile, "wb")) == NULL) {        fprintf(stderr, "Cannot open reconstruction file \"%s\"\n", param->recoFile);        exit(1);      }      break;    default:      fprintf(stderr, "Unknown reconstruction file format\n");      exit(1);    }    recoFile->enabled = 1;    recoFile->format = param->recoFormat;  }  /*   * open bitstream file   */  if ((strByte->fn = fopen(param->inFile, "rb")) == NULL) {    fprintf(stderr, "Cannot open input bitstream\n");    exit(1);  }  if ((strByte->bitbuf = malloc(NALBUF_INITIAL_SIZE)) == NULL) {    fprintf(stderr, "Cannot allocate memory for bitstream\n");    exit(1);  }  strByte->bytesRead           = 0;  strByte->bitbufLen           = NALBUF_INITIAL_SIZE;  strByte->bitbufDataLen       = 0;  strByte->bitbufDataPos       = 0;  strByte->bitbufNalunitLen    = 0;}/* * * closeFiles: * * Parameters: *      recoFile              Reconstruction file *      recoFlag              Rec. frames were written to file if true *      str                   Bitsream * * Function: *      Close raw video files *       * Returns: *      - * */static void closeFiles(videoFile_s *recoFile, byteStream_s *str){  if (recoFile->enabled) {    switch (recoFile->format) {    case SEPARATE_YUV_FILES:      fclose(recoFile->y);      fclose(recoFile->u);      fclose(recoFile->v);      break;    case COMBINED_YUV_FILE:      fclose(recoFile->yuv);    }    recoFile->enabled = 0;  }  fclose(str->fn);  free(str->bitbuf);}/* * * writeFrame: * * Parameters: *      buf                   Frame buffer *      outFile               Destination file *      cropFlag              True if cropping enabled * * Function: *      Writes frame to the file *       * Returns: *      - * */static void writeFrame(avcdYUVbuffer_s *buf,  videoFile_s *outFile, int cropFlag){  FILE *yFile, *uFile, *vFile;  if (buf == NULL) return;  switch (outFile->format) {  case SEPARATE_YUV_FILES:    yFile = outFile->y;    uFile = outFile->u;    vFile = outFile->v;    break;  case COMBINED_YUV_FILE:    yFile = uFile = vFile = outFile->yuv;    break;  default:    fprintf(stderr, "Unknown reconstruction file type\n");    exit(1);  }  if (!(cropFlag && (buf->cropLeftOff | buf->cropRightOff | buf->cropTopOff | buf->cropBottomOff) != 0)) {    fwrite(buf->y, sizeof(unsigned char), buf->width*buf->height,   yFile);    fwrite(buf->u, sizeof(unsigned char), buf->width*buf->height/4, uFile);    fwrite(buf->v, sizeof(unsigned char), buf->width*buf->height/4, vFile);  }  else {    int cropTop, cropBottom, cropLeft, cropRight;    int totalWidth;    int cropWidth, cropHeight;    unsigned char *imgPtr;    int i;    cropTop     = 2*buf->cropTopOff;    cropBottom  = 2*buf->cropBottomOff;    cropLeft    = 2*buf->cropLeftOff;    cropRight   = 2*buf->cropRightOff;    totalWidth = buf->width;    cropWidth  = totalWidth - cropLeft - cropRight;    cropHeight = buf->height - cropTop - cropBottom;    imgPtr = &((unsigned char *)buf->y)[cropTop*totalWidth + cropLeft];    for (i = 0; i < cropHeight; i++)      fwrite(&imgPtr[i*totalWidth], sizeof(unsigned char), cropWidth, yFile);    totalWidth = totalWidth/2;    cropWidth  = cropWidth/2;    cropHeight = cropHeight/2;    imgPtr = &((unsigned char *)buf->u)[cropTop/2*totalWidth + cropLeft/2];    for (i = 0; i < cropHeight; i++)      fwrite(&imgPtr[i*totalWidth], sizeof(unsigned char), cropWidth, uFile);    imgPtr = &((unsigned char *)buf->v)[cropTop/2*totalWidth + cropLeft/2];    for (i = 0; i < cropHeight; i++)      fwrite(&imgPtr[i*totalWidth], sizeof(unsigned char), cropWidth, vFile);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.欧美亚洲| 亚洲高清在线视频| 日韩精品一区二区在线观看| 国产欧美日韩精品a在线观看| 国产精品视频免费看| 国产欧美一区二区三区在线老狼| 国产高清在线精品| 一区二区三区蜜桃| 777奇米成人网| 秋霞电影一区二区| 精品处破学生在线二十三| 91浏览器在线视频| 午夜精品久久久久久久久| 91麻豆精品久久久久蜜臀| 精品视频免费看| 亚洲一区视频在线| 日韩精品资源二区在线| 日韩一卡二卡三卡四卡| 99精品久久99久久久久| 开心九九激情九九欧美日韩精美视频电影 | 久久蜜桃av一区二区天堂| 欧美一区二区三区思思人 | 久久品道一品道久久精品| 久久久久久麻豆| 久久久三级国产网站| 欧美蜜桃一区二区三区| 国产精品一区二区三区网站| 中文字幕视频一区二区三区久| 欧美日韩高清不卡| 欧美成人在线直播| 欧美日韩一级黄| 欧美在线free| 亚洲精品国产精品乱码不99| 欧美不卡一区二区三区| 日韩在线一区二区| 337p亚洲精品色噜噜噜| 国产精品影视在线观看| 国产精品久久久久久福利一牛影视 | 亚洲精品国产无天堂网2021| 一区二区三区加勒比av| 欧美韩国日本综合| 在线亚洲免费视频| 91在线国产福利| 国产成人精品一区二区三区四区| 日韩欧美视频在线| 国产欧美日韩久久| 中文字幕精品一区| 国产精品久久久久9999吃药| 欧美三日本三级三级在线播放| 97精品久久久久中文字幕| 中文字幕字幕中文在线中不卡视频| 91蝌蚪porny| 国产一区二区三区av电影| 亚洲色图欧美在线| 激情图片小说一区| 九九热在线视频观看这里只有精品| 亚洲精品中文在线影院| 日韩极品在线观看| 日韩国产欧美视频| 青青草原综合久久大伊人精品| 波多野结衣中文一区| 高清shemale亚洲人妖| 国产一区二区三区免费观看| 欧美在线免费视屏| 亚洲欧美在线观看| av电影天堂一区二区在线观看| 精品国产乱码久久久久久闺蜜| 91国模大尺度私拍在线视频| 亚洲国产精品影院| 蜜桃91丨九色丨蝌蚪91桃色| 狠狠狠色丁香婷婷综合激情| 欧美人狂配大交3d怪物一区| 亚洲在线免费播放| 91香蕉国产在线观看软件| 国产欧美一二三区| 成人高清免费观看| 国产精品伦一区| 99久久精品久久久久久清纯| 国产精品久久久久久久久动漫| 亚洲一区在线免费观看| 99麻豆久久久国产精品免费优播| 国产精品久久影院| 成人永久免费视频| 99国产精品久久久久久久久久 | 国产成人自拍高清视频在线免费播放| 欧美videossexotv100| 亚洲成人自拍网| 久久精品99久久久| 欧美精品乱码久久久久久按摩| 久久嫩草精品久久久精品一| 国产精品一区在线观看你懂的| 欧美人xxxx| 久久美女艺术照精彩视频福利播放 | 五月天精品一区二区三区| 欧美精品久久99久久在免费线 | 精品国产第一区二区三区观看体验| 精品无人码麻豆乱码1区2区| 欧美老年两性高潮| 久久国产精品一区二区| 国产精品久久久久永久免费观看 | 五月天中文字幕一区二区| 欧美久久久久免费| 一区二区三区四区不卡在线| 91美女片黄在线观看| 欧美精品第1页| 久久精品国产色蜜蜜麻豆| 久久你懂得1024| 在线精品视频小说1| 亚洲三级在线观看| 制服.丝袜.亚洲.中文.综合| 国产成人啪免费观看软件| 亚洲欧美另类图片小说| 日本成人在线视频网站| 久久看人人爽人人| 91麻豆精东视频| 国内精品国产三级国产a久久| 亚洲另类色综合网站| 日韩一区二区三区免费看 | 欧美午夜电影在线播放| 国产亲近乱来精品视频 | 欧美mv和日韩mv的网站| 不卡的av电影在线观看| 视频一区二区国产| 亚洲精品在线电影| 欧美视频三区在线播放| 久久疯狂做爰流白浆xx| 亚洲免费在线电影| 久久久一区二区三区捆绑**| 欧美日韩免费一区二区三区| 国产成人亚洲精品青草天美| 丝袜国产日韩另类美女| 国产精品国产馆在线真实露脸 | 综合婷婷亚洲小说| 51精品视频一区二区三区| 国产激情视频一区二区在线观看| 亚洲伊人色欲综合网| 综合中文字幕亚洲| 国产亚洲精品精华液| 亚洲美女视频在线| 国产欧美va欧美不卡在线| 91精品国产色综合久久不卡蜜臀| 国产老女人精品毛片久久| 天堂久久久久va久久久久| 亚洲一区二区三区中文字幕| 国产亚洲一区字幕| 制服丝袜亚洲精品中文字幕| 欧美日韩国产美女| 亚洲女同女同女同女同女同69| 久久久国产午夜精品| 久久免费精品国产久精品久久久久| 日韩欧美高清一区| 日韩欧美国产小视频| 精品国产亚洲在线| 日韩欧美国产系列| 91精品免费在线| 日韩午夜中文字幕| 日韩欧美不卡在线观看视频| 欧美成人vr18sexvr| wwwwww.欧美系列| 狠狠色狠狠色综合系列| 国产一区二区三区在线观看免费 | 678五月天丁香亚洲综合网| 欧美久久久久久蜜桃| 欧美日韩免费观看一区二区三区| 欧美久久久久久久久久| 6080午夜不卡| 精品视频一区二区三区免费| 欧美大片在线观看| 制服丝袜亚洲色图| 成人国产在线观看| 成人av免费在线| 欧美专区日韩专区| 日韩欧美另类在线| 欧美国产日韩精品免费观看| 亚洲美女在线一区| 视频在线观看一区| 国产乱码精品一区二区三区五月婷| 国产**成人网毛片九色 | 亚洲一区二区欧美| 蜜臀av在线播放一区二区三区 | 精品国产一区二区三区四区四| 久久久久久97三级| 国产精品理论片在线观看| 欧美精品tushy高清| 成人黄色av网站在线| 一本大道综合伊人精品热热| 成人小视频免费观看| 97久久精品人人澡人人爽| 亚洲精品成a人| 国产综合成人久久大片91| 99久久精品免费看国产| 日韩一区二区免费在线观看| 成人性生交大片免费看在线播放 | 日韩写真欧美这视频| 国产欧美日韩另类一区| 天堂影院一区二区| 不卡视频一二三| 日韩免费在线观看| 亚洲综合丝袜美腿| 大桥未久av一区二区三区中文|