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

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

?? ftmcp100.c

?? 基于Linux的ffmepg decoder
?? C
?? 第 1 頁 / 共 2 頁
字號:
GLOBAL(void) ftmcp100_dump_yuv (j_decompress_ptr cinfo)
{  
  #ifdef VPE_OUTPUT  
  #ifdef VPE_DUMP_YUV   
  int ci;
  jpeg_component_info *compptr;
  FTMCP100_CODEC *pCodec=(FTMCP100_CODEC *)cinfo->pCodec;
  
  RTL_DEBUG_OUT(0x60000000) // instruct the hardware to open a YUV file for dumping

  //for (ci = 0; ci < cinfo->comps_in_scan; ci++)
  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;ci++, compptr++) 
    {
      int m; // total words count in one component
      unsigned int *p=(unsigned int *)pCodec->outdata[ci];
      //compptr = cinfo->cur_comp_info[ci];
      // calculate the total blocks = blocks per MCU * total MCU count
      if(jpeg_has_multiple_scans(cinfo))
        m=compptr->MCU_blocks*compptr->width_in_blocks*compptr->height_in_blocks;
      else
        m=compptr->MCU_blocks*cinfo->MCUs_per_row*cinfo->MCU_rows_in_scan;        
      // calculate total words , 16 words for each block
      m=m<<4;
      while(m--)
        {
          RTL_DEBUG_OUT(0x70000000 | (unsigned int)p)
          p++;
        }
    }

  RTL_DEBUG_OUT(0x60000001) // instruct the hardware to close a YUV file previously opened by 'RTL_DEBUG_OUT(0x60000000)' operation
  #endif
  #endif
}

// copied from GZIP source codes
/*
   Huffman code decoding is performed using a multi-level table lookup.
   The fastest way to decode is to simply build a lookup table whose
   size is determined by the longest code.  However, the time it takes
   to build this table can also be a factor if the data being decoded
   is not very long.  The most common codes are necessarily the
   shortest codes, so those codes dominate the decoding time, and hence
   the speed.  The idea is you can have a shorter table that decodes the
   shorter, more probable codes, and then point to subsidiary tables for
   the longer codes.  The time it costs to decode the longer codes is
   then traded against the time it takes to make longer tables.

   This results of this trade are in the variables lbits and dbits
   below.  lbits is the number of bits the first level table for literal/
   length codes can decode in one step, and dbits is the same thing for
   the distance codes.  Subsequent tables are also less than or equal to
   those sizes.  These values may be adjusted either when all of the
   codes are shorter than that, in which case the longest code length in
   bits is used, or when the shortest code is *longer* than the requested
   table size, in which case the length of the shortest code in bits is
   used.

   There are two different values for the two tables, since they code a
   different number of possibilities each.  The literal/length table
   codes 286 possible values, or in a flat code, a little over eight
   bits.  The distance table codes 30 possible values, or a little less
   than five bits, flat.  The optimum values for speed end up being
   about one bit more than those, so lbits is 8+1 and dbits is 5+1.
   The optimum values may differ though from machine to machine, and
   possibly even between compilers.  Your mileage may vary.
 */

//int huft_build(b, n, s, d, e, t, m)
//unsigned *b;            /* code lengths in bits (all assumed <= BMAX) */
//unsigned n;             /* number of codes (assumed <= N_MAX) */
//unsigned s;             /* number of simple-valued codes (0..s-1) */
//unsigned *v;            /* added by Leo, the array of huffman value */
//unsigned *ct;           /* added by Leo, the table of huffman codeword */
//ush *d;                 /* list of base values for non-simple codes */
//ush *e;                 /* list of extra bits for non-simple codes */
//struct huft **t;        /* result: starting table */
//int *m;                 /* maximum lookup bits, returns actual */
GLOBAL(int) huft_build(j_decompress_ptr cinfo,unsigned *b,unsigned n,unsigned s,unsigned int *v,unsigned *ct,unsigned short *d, unsigned short *e, struct huft **t, int *m)
/* Given a list of code lengths and a maximum table size, make a set of
   tables to decode that set of codes.  Return zero on success, one if
   the given code set is incomplete (the tables are still built in this
   case), two if the input is invalid (all zero length codes or an
   oversubscribed set of lengths), and three if not enough memory. */
{
  unsigned a;                   /* counter for codes of length k */
  unsigned c[BMAX+1];           /* bit length count table */
  unsigned f;                   /* i repeats in table every f entries */
  int g;                        /* maximum code length */
  int h;                        /* table level */
  register unsigned i;          /* counter, current code */
  register unsigned j;          /* counter */
  register int k;               /* number of bits in current code */
  int l;                        /* bits per table (returned in m) */
  register unsigned *p;         /* pointer into c[], b[], or v[] */
  register struct huft *q;      /* points to current table */
  struct huft r;                /* table entry for structure assignment */
  struct huft *u[BMAX];         /* table stack */
  //unsigned v[N_MAX];            /* values in order of bit length */
  register int w;               /* bits before this table == (l * h) */
  unsigned x[BMAX+1];           /* bit offsets, then code stack */
  unsigned *xp;                 /* pointer into x */
  //int y;                        /* number of dummy codes added */
  unsigned z;                   /* number of entries in current table */

  unsigned int ii,cc=0; // added by Leo for another counter
  unsigned int mask; // added by Leo for mask

  unsigned int hufts=0; // add by Leo, number of valid struct huft entry allocated so far
  unsigned int hufts_stk[BMAX];  // added by Leo, start offset of each table's stack

  /* Generate counts for each bit length */
  //memzero(c, sizeof(c));
  memset ((char *)(c), 0, sizeof(c));
  
  p = b;  i = n;
  do {
    c[*p]++;                    /* assume all entries <= BMAX */
    p++;                      /* Can't combine with above line (Solaris bug) */
  } while (--i);
  if (c[0] == n)                /* null input--all zero length codes */
  {
    *t = (struct huft *)NULL;
    *m = 0;
    return 0;
  }

  /* Find minimum and maximum length, bound *m by those */
  l = *m;
  for (j = 1; j <= BMAX; j++)
    if (c[j])
      break;
  k = j;                        /* minimum code length */
  if ((unsigned)l < j)
    l = j;
  for (i = BMAX; i; i--)
    if (c[i])
      break;
  g = i;                        /* maximum code length */
  if ((unsigned)l > i)
    l = i;
  *m = l;


  /* Adjust last length count to fill out codes, if needed */
  //for (y = 1 << j; j < i; j++, y <<= 1)
    //if ((y -= c[j]) < 0)
      //return 2;                 /* bad input: more codes than bits */
  //if ((y -= c[i]) < 0)
    //return 2;
  //c[i] += y;


  /* Generate starting offsets into the value table for each length */
  x[1] = j = 0;
  p = c + 1;  xp = x + 2;
  while (--i) {                 /* note that i == g from above */
    *xp++ = (j += *p++);
  }


  /* Make a table of values in order of bit lengths */
  //p = b;  i = 0;
  //do {
  //  if ((j = *p++) != 0)
  //    v[x[j]++] = i;
  //} while (++i < n);


  /* Generate the Huffman codes and for each, make the table entries */
  x[0] = i = 0;                 /* first Huffman code is zero */
  i=*ct; // added by Leo
  
  p = v;                        /* grab values in bit order */
  h = -1;                       /* no tables yet--level -1 */
  w = -l;                       /* bits decoded == (l * h) */
  u[0] = (struct huft *)NULL;   /* just to keep compilers happy */
  q = (struct huft *)NULL;      /* ditto */
  z = 0;                        /* ditto */

  /* go through the bit lengths (k already is bits in shortest code) */
  for (; k <= g; k++)
  {
    a = c[k];
    while (a--)
    {
      /* here i is the Huffman code of length k bits for value *p */
      /* make tables up to required level */
      while (k > w + l)
      {
        h++;
        w += l;                 /* previous table always l bits */

        /* compute minimum size table less than or equal to l bits */        
        z = (z = g - w) > (unsigned)l ? l : z;  /* upper limit on table size */
        if ((f = 1 << (j = k - w)) > a + 1)     /* try a k-w bit table */
        {                       /* too few codes for k-w bit table */
          f -= a + 1;           /* deduct codes from patterns left */
          xp = c + k;
          while (++j < z)       /* try smaller tables up to z bits */
          {
            if ((f <<= 1) <= *++xp)
              break;            /* enough codes to use up j bits */
            f -= *xp;           /* else deduct codes from patterns */
          }
        }
        
        j=(j>z)?z:j;   // added by Leo for limiting the maximum upper limit for working around ConvGrid.jpg and huffman table2 jpg test patterns         
        z = 1 << j;             /* table entries for j-bit table */
        //z = 1 << ((j>z)?z:j);             /* table entries for j-bit table */ // modified by Leo
 
        /* allocate and link in new table */
        //if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) ==
        //    (struct huft *)NULL)
        if ((q = (struct huft *) ((*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,(z + 1)*sizeof(struct huft)))) == NULL)
        {
          //if (h) huft_free(u[0]);
          return 3;             /* not enough memory */
        }
        // added by Leo , we clean the allocated memory
        //MEMZERO(q,(z + 1)*sizeof(struct huft)); let's don't clean this memory for hardware simulation purpose

        
        *t = q + 1;             /* link to list for huft_free() */
        *(t = &(q->nextpt)) = (struct huft *)NULL;
		q->tblsize=z; // record the size of table in halfword size
        //u[h] = ++q;   // table starts after link

        hufts=(hufts%z)?(hufts+z-(hufts%z)):hufts;
		hufts_stk[h]=hufts;

        q->data.offset=hufts; // record the offset of this table

		hufts += z;

        u[h] = ++q;   // table starts after link

        /* connect to last table, if there is one */
        if (h)
        {
          x[h] = i>> (k-w);             /* save pattern for backing up */
          //r.b = (unsigned char)l;         /* bits to dump before this table */
          //r.e = (unsigned char)(16 + j);  /* bits in this table */
          //r.v.t = q;            /* pointer to this table */
          
		  // added by Leo
	      r.tbl=1;
	      r.valid=1;		  
          r.codelen=j-1;          
	      r.data.offset=hufts_stk[h];
          //j = i >> (w - l);     /* (get around Turbo C bug) */
          //u[h-1][j] = r;        /* connect to last table */
          ii = (i&(((1<<l)-1)<<(k-w))) >> (k-w);
          u[h-1][ii] = r;        /* connect to last table */		  
        }
      }

      /* set up table entry in r */	  
      //r.b = (unsigned char)(k - w);
      //if (p >= v + n)
      //  r.e = 99;               /* out of values--invalid code */
      //else if (*p < s)
      //{
      //  r.e = (unsigned char)(*p < 256 ? 16 : 15);    /* 256 is end-of-block code */
      //  r.v.n = (unsigned char)(*p);             /* simple code is just the value */
	  //  p++;                           /* one compiler does not like *p++ */
      //}
      //else
      //{
      //  r.e = (unsigned  char)e[*p - s];   /* non-simple--look up in lists */
      //  r.v.n = d[*p++ - s];
      //}

	  // added by Leo
	  
	  r.tbl=0;
	  r.valid=1;
	  r.codelen=(k-w)-1;      
	  r.data.value=*p++;      

      /* fill code-like entries with r */
      //f = 1 << (k - w);
      //for (j = i >> w; j < z; j += f)
      //  q[j] = r;
	  f = (j-(k-w));
      mask = (1<<(k-w))-1;  // to be used as mask
      i = (i&mask) << f;
      for (ii = 0 ; ii < (unsigned)(1<<f); ii++,i++)
        q[i] = r;

      /* backwards increment the k-bit code i */
      //for (j = 1 << (k - 1); i & j; j >>= 1)
      //  i ^= j;
      //i ^= j;
	  i=*(++ct); // modified by Leo. get next huffman code

      cc++;

      /* backup over finished tables */
      //while ((i & ((1 << w) - 1)) != x[h])
      f=b[cc]-w; // get the next symbol's code length
	  while ( ((i&(((1<<w)-1)<<f))>>f) != x[h] )
      {
        h--;                    /* don't need to update q */
        w -= l;
      }
      
    }	
  } 
  /* Return true (1) if we were given an incomplete table */
  //return y != 0 && g != 1;  
  return 0; // modified by Leo
}

/*
GLOBAL(int) huft_free(struct huft *t)         // table to free 
// Free the malloc'ed tables built by huft_build(), which makes a linked
//   list of the tables it made, with the links in a dummy first entry of
//   each table. 
{
  register struct huft *p, *q;


  // Go through linked list, freeing from the malloced (t[-1]) address.
  p = t;
  while (p != (struct huft *)NULL)
  {
    q = (--p)->v.t;
    free((char*)p);
    p = q;
  } 
  return 0;
}
*/

//---------------------------------------------------------------------------
//---------------------------------------------------------------------------


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区在线观看视频 | 亚洲美女精品一区| 丝袜亚洲另类丝袜在线| 国产一区二区精品久久91| 91一区二区三区在线观看| 欧美一区二区在线免费播放| 亚洲视频小说图片| 国产一区二区中文字幕| 51精品国自产在线| 一区二区三区在线观看网站| 粉嫩aⅴ一区二区三区四区| 91麻豆精品国产91久久久| 国产精品国产a级| 精品一区二区三区在线播放| 欧美三级一区二区| 亚洲激情五月婷婷| www.欧美.com| 亚洲国产成人在线| 国产电影一区在线| 久久久久99精品国产片| 激情五月婷婷综合网| 7777精品伊人久久久大香线蕉的 | 国产精品美女久久久久久久久| 麻豆成人综合网| 日韩一区二区三| 丝袜诱惑亚洲看片| 欧美顶级少妇做爰| 午夜日韩在线电影| 欧美日韩国产中文| 亚洲va欧美va人人爽午夜| 欧美午夜精品一区二区三区| 亚洲人成伊人成综合网小说| 99精品视频在线观看免费| 亚洲欧洲成人精品av97| 本田岬高潮一区二区三区| 国产女人18水真多18精品一级做 | 日本伊人精品一区二区三区观看方式| 色悠久久久久综合欧美99| 亚洲裸体在线观看| 91福利小视频| 午夜av一区二区| 欧美一卡二卡在线观看| 美女mm1313爽爽久久久蜜臀| 欧美zozozo| 懂色av一区二区三区免费观看| 国产亚洲欧美日韩在线一区| 成人免费视频网站在线观看| 中文字幕综合网| 欧洲视频一区二区| 日本美女视频一区二区| 久久色中文字幕| 成人av免费在线播放| 日韩理论片网站| 欧美精品日日鲁夜夜添| 精品一区二区三区香蕉蜜桃| 国产精品美女视频| 欧美日韩美少妇| 激情深爱一区二区| 国产精品久久久久影视| 欧美中文字幕不卡| 免费美女久久99| 国产精品丝袜一区| 欧美精品久久天天躁| 国产精品综合二区| 亚洲一区二区三区中文字幕| 日韩欧美的一区| 91丨九色丨尤物| 日本系列欧美系列| 国产精品私人自拍| 在线播放亚洲一区| 成人涩涩免费视频| 美女一区二区三区| 亚洲日本一区二区三区| 日韩欧美一区二区视频| 色综合久久88色综合天天6| 另类的小说在线视频另类成人小视频在线 | 国产自产高清不卡| 亚洲天堂免费看| 久久婷婷久久一区二区三区| 欧美日韩高清一区| 国产大陆亚洲精品国产| 亚洲成人精品在线观看| 国产精品视频一区二区三区不卡| 欧美少妇bbb| 99久久婷婷国产综合精品电影| 日本人妖一区二区| 国产精品乱码妇女bbbb| 精品国产亚洲一区二区三区在线观看| a美女胸又www黄视频久久| 狠狠色丁香婷婷综合| 亚洲va欧美va天堂v国产综合| 亚洲一卡二卡三卡四卡无卡久久 | 日本一区二区在线不卡| 欧美精品高清视频| 色综合色狠狠综合色| 国产精选一区二区三区| 日韩成人午夜电影| 亚洲一区二三区| 国产精品福利一区二区| 久久久国产精品不卡| 欧美成人官网二区| 91精品国产黑色紧身裤美女| 欧美视频一区在线观看| 91福利小视频| 欧美专区亚洲专区| 在线视频国产一区| 一本到高清视频免费精品| 成人动漫在线一区| 成人一区二区视频| 国产成人免费视频| 国产成人福利片| 懂色av一区二区三区免费观看| 国产在线看一区| 激情综合色播激情啊| 国产麻豆精品theporn| 精品一区二区在线免费观看| 精品一区二区免费| 国产精品综合一区二区三区| 国产成人在线视频播放| 成人中文字幕合集| 成人黄色免费短视频| 99综合影院在线| 色偷偷久久一区二区三区| 色综合久久久久久久| 欧美日韩亚洲高清一区二区| 欧美午夜免费电影| 欧美疯狂做受xxxx富婆| 日韩一区二区三区av| 精品99999| 国产精品久线在线观看| 亚洲人成在线观看一区二区| 亚洲乱码国产乱码精品精小说| 亚洲一区二区三区四区在线免费观看 | 欧美巨大另类极品videosbest | 天天色综合天天| 日韩电影在线观看网站| 激情欧美日韩一区二区| 从欧美一区二区三区| 一本久久a久久免费精品不卡| 欧美日韩国产高清一区二区三区| 91精品福利在线一区二区三区| 日韩免费高清av| 国产精品免费视频一区| 亚洲综合久久av| 国产综合色视频| 91麻豆福利精品推荐| 这里只有精品99re| 国产亚洲精品资源在线26u| 亚洲日本欧美天堂| 青青草一区二区三区| jiyouzz国产精品久久| 欧美精品久久天天躁| 欧美激情一区二区三区四区| 亚洲国产成人av网| 国产成人免费网站| 欧美日韩一级视频| 欧美激情资源网| 日韩国产在线一| www.亚洲免费av| 日韩亚洲欧美高清| 亚洲天堂av老司机| 韩国av一区二区三区在线观看| 色综合久久久久| 国产亚洲人成网站| 蜜臀av性久久久久av蜜臀妖精| 99精品欧美一区二区蜜桃免费| 欧美另类z0zxhd电影| 国产精品久久久久一区二区三区共| 日韩高清欧美激情| 91在线播放网址| 久久网这里都是精品| 日韩中文欧美在线| 色网站国产精品| 国产精品看片你懂得| 国内精品视频666| 欧美日韩久久一区| 亚洲免费观看高清完整版在线观看 | 91在线无精精品入口| 久久婷婷国产综合精品青草| 日韩精品国产欧美| 欧美在线观看一二区| 亚洲欧洲精品天堂一级| 国产91对白在线观看九色| 日韩欧美国产成人一区二区| 亚洲一区二区三区三| 91小视频免费观看| 久久看人人爽人人| 久久爱另类一区二区小说| 欧美日韩成人综合在线一区二区| 亚洲三级免费电影| 成人高清在线视频| 久久精品网站免费观看| 国内外精品视频| 欧美哺乳videos| 久久er精品视频| 精品国产91洋老外米糕| 久久成人综合网| 久久综合色天天久久综合图片| 国内精品写真在线观看| 久久久精品免费观看|