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

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

?? main.cpp

?? JMVM MPEG MVC/3DAV 測試平臺 國際通用標準
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*
********************************************************************************

NOTE - One of the two copyright statements below may be chosen
       that applies for the software.

********************************************************************************

This software module was originally developed by

Heiko Schwarz    (Fraunhofer HHI),
Tobias Hinz      (Fraunhofer HHI),
Karsten Suehring (Fraunhofer HHI)

in the course of development of the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video
Coding) for reference purposes and its performance may not have been optimized.
This software module is an implementation of one or more tools as specified by
the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding).

Those intending to use this software module in products are advised that its
use may infringe existing patents. ISO/IEC have no liability for use of this
software module or modifications thereof.

Assurance that the originally developed software module can be used
(1) in the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding) once the
ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding) has been adopted; and
(2) to develop the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding): 

To the extent that Fraunhofer HHI owns patent rights that would be required to
make, use, or sell the originally developed software module or portions thereof
included in the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding) in a
conforming product, Fraunhofer HHI will assure the ISO/IEC that it is willing
to negotiate licenses under reasonable and non-discriminatory terms and
conditions with applicants throughout the world.

Fraunhofer HHI retains full right to modify and use the code for its own
purpose, assign or donate the code to a third party and to inhibit third
parties from using the code for products that do not conform to MPEG-related
ITU Recommendations and/or ISO/IEC International Standards. 

This copyright notice must be included in all copies or derivative works.
Copyright (c) ISO/IEC 2005. 

********************************************************************************

COPYRIGHT AND WARRANTY INFORMATION

Copyright 2005, International Telecommunications Union, Geneva

The Fraunhofer HHI hereby donate this source code to the ITU, with the following
understanding:
    1. Fraunhofer HHI retain the right to do whatever they wish with the
       contributed source code, without limit.
    2. Fraunhofer HHI retain full patent rights (if any exist) in the technical
       content of techniques and algorithms herein.
    3. The ITU shall make this code available to anyone, free of license or
       royalty fees.

DISCLAIMER OF WARRANTY

These software programs are available to the user without any license fee or
royalty on an "as is" basis. The ITU disclaims any and all warranties, whether
express, implied, or statutory, including any implied warranties of
merchantability or of fitness for a particular purpose. In no event shall the
contributor or the ITU be liable for any incidental, punitive, or consequential
damages of any kind whatsoever arising from the use of these programs.

This disclaimer of warranty extends to the user of these programs and user's
customers, employees, agents, transferees, successors, and assigns.

The ITU does not represent or warrant that the programs furnished hereunder are
free of infringement of any third-party patents. Commercial implementations of
ITU-T Recommendations, including shareware, may be subject to royalty fees to
patent holders. Information regarding the ITU-T patent policy is available from 
the ITU Web site at http://www.itu.int.

THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE ITU-T PATENT POLICY.

********************************************************************************
*/


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define DOWN_CONVERT_STATIC

//#define OLD_DYADIC_UPSAMPLE //to be outcommented to use the old MPEG-4 (dyadic) upsampling filter for both luma and chroma

#define FILTER_UP   int piFilter[16] = {  0,  0,  1,  0, -5,  0, 20,   32,   20,    0, -5,  0,  1,  0,  0,   64 };

#ifndef OLD_DYADIC_UPSAMPLE
//cixunzhang add
#define FILTER_UP_CHROMA   int piFilter_chroma[16] = {  0,  0,  0,  0, 0,  0, 16,   32,   16,    0, 0,  0,  0,  0,  0,   64 };
#endif



#define FILTER_DOWN int piFilter[16] = {  0,  2,  0, -4, -3,  5, 19,   26,   19,    5, -3, -4,  0,  2,  0,   64 };


#include "DownConvert.h"


typedef struct
{
  int             width;
  int             height;
  unsigned char*  data;
} ColorComponent;

typedef struct
{
  ColorComponent lum;
  ColorComponent cb;
  ColorComponent cr;
} YuvFrame;



void createColorComponent( ColorComponent* cc )
{
 if( ! ( cc->data = new unsigned char[cc->width * cc->height]))
  {
   fprintf(stderr, "\nERROR: memory allocation failed!\n\n");
    exit(1);
  }
}

void deleteColorComponent( ColorComponent* cc )
{
  delete[] cc->data;
  cc->data = NULL;
}


void setColorComponent ( ColorComponent* cc, unsigned char value )
{
  memset(cc->data, value, cc->width*cc->height);
}


void createFrame( YuvFrame* f, int width, int height )
{
  f->lum.width = width;    f->lum.height  = height;     createColorComponent( &f->lum );
  f->cb .width = width/2;  f->cb .height  = height/2;   createColorComponent( &f->cb  );
  f->cr .width = width/2;  f->cr .height  = height/2;   createColorComponent( &f->cr  );
}

void deleteFrame( YuvFrame* f )
{
  deleteColorComponent( &f->lum );
  deleteColorComponent( &f->cb  );
  deleteColorComponent( &f->cr  );
}

void setFrame ( YuvFrame* f, unsigned char y_value,  unsigned char u_value, unsigned char v_value)
{
  setColorComponent(&f->lum, y_value);
  setColorComponent(&f->cb,  u_value);
  setColorComponent(&f->cr,  v_value);
}

void clearFrame ( YuvFrame* f)
{
  setFrame(f, 0, 0, 0);
}

void readColorComponent( ColorComponent* cc, FILE* file, int inwidth, int inheight )
{
  int rsize;

  for( int i = 0; i < inheight; i++ )
  {
    rsize = fread( cc->data+i*cc->width, sizeof(unsigned char), inwidth, file );

    if( rsize != inwidth )
    {
      fprintf(stderr, "\nERROR: while reading from input file!\n\n");
      exit(1);
    }
  }
}

void writeColorComponent( ColorComponent* cc, FILE* file, int outwidth, int outheight )
{
  int wsize;

  for( int i = 0; i < outheight; i++ )
  {
    wsize = fwrite( cc->data+i*cc->width, sizeof(unsigned char), outwidth, file );

    if( outwidth != wsize )
    {
      fprintf(stderr, "\nERROR: while writing to output file!\n\n");
      exit(1);
    }
  }
}

void readFrame( YuvFrame* f, FILE* file, int width, int height )
{
  readColorComponent( &f->lum, file, width, height );
  readColorComponent( &f->cb,  file, width/2, height/2 );
  readColorComponent( &f->cr,  file, width/2, height/2 );
}

void writeFrame( YuvFrame* f, FILE* file, int width, int height )
{
  writeColorComponent( &f->lum, file, width, height );
  writeColorComponent( &f->cb,  file, width/2, height/2 );
  writeColorComponent( &f->cr,  file, width/2, height/2 );
}

void print_usage_and_exit( int test, char* name, char* message = 0 )
{
  if( test )
  {
    if( message )
    {
      fprintf ( stderr, "\nERROR: %s\n", message );
    }
    fprintf (   stderr, "\nUsage: %s <win> <hin> <in> <wout> <hout> <out> [<method> [<t> [<skip> [<frms>]]]] [[-crop <args>] [-phase <args>]]\n\n", name );
    fprintf (   stderr, "  win     : input width  (luma samples)\n" );
    fprintf (   stderr, "  hin     : input height (luma samples)\n" );
    fprintf (   stderr, "  in      : input file\n" );
	  fprintf (   stderr, "  wout    : output width  (luma samples)\n" );
    fprintf (   stderr, "  hout    : output height (luma samples)\n" );
    fprintf (   stderr, "  out     : output file\n" );
    fprintf (   stderr, "\n--------------------------- OPTIONAL ---------------------------\n\n" );
	  fprintf (   stderr, "  method  : rescaling methods (default: 0)\n" );
	  fprintf (   stderr, "            0: normative upsampling\n" );
 	  fprintf (   stderr, "               non-normative downsampling (JVT-R006)\n" );
    fprintf (   stderr, "            1: dyadic upsampling (AVC 6-tap (1/2 pel) on odd samples\n" );
    fprintf (   stderr, "               dyadic downsampling (MPEG-4 downsampling filter)\n" );
    fprintf (   stderr, "            2: crop only\n" );
    fprintf (   stderr, "            3: upsampling (Three-lobed Lanczos-windowed sinc)\n" );
    fprintf (   stderr, "            4: upsampling (JVT-O041: AVC 6-tap (1/2 pel) + bilinear 1/4 pel)\n" );
    fprintf (   stderr, "  t       : number of temporal downsampling stages (default: 0)\n" );
    fprintf (   stderr, "  skip    : number of frames to skip at start (default: 0)\n" );
    fprintf (   stderr, "  frms    : number of frames wanted in output file (default: max)\n" );
    fprintf (   stderr, "\n-------------------------- OVERLOADED --------------------------\n\n" );
    fprintf (   stderr, " -crop  <type> <parameters>\n");
    fprintf (   stderr, "   type   : 0: Sequence level,    1: Picture level\n");
    fprintf (   stderr, "   params : IF Sequence level: <x_orig> <y_orig> <crop_width> <crop_height>\n");
    fprintf (   stderr, "               cropping window origin (x,y) and dimensions (width and height)\n");
    fprintf (   stderr, "            IF Picture level: <crop_file>\n");
    fprintf (   stderr, "                 input file containing cropping window parameters.\n" );
    fprintf (   stderr, "                 each line has four integer numbers separated by a comma\n" );
    fprintf (   stderr, "                 as following: \"x_orig, y_orig, crop_width, crop_height\"\n");
    fprintf (   stderr, "                 for each picture to be resampled;\n" );
    fprintf (   stderr, "\n");
    fprintf (   stderr, " -phase <in_uv_ph_x> <in_uv_ph_y> <out_uv_ph_x> <out_uv_ph_y>\n");
    fprintf (   stderr, "   in_uv_ph_x : input  chroma phase shift in horizontal direction (default:-1)\n" );
    fprintf (   stderr, "   in_uv_ph_y : input  chroma phase shift in vertical   direction (default: 0)\n" );
    fprintf (   stderr, "   out_uv_ph_x: output chroma phase shift in horizontal direction (default:-1)\n" );
    fprintf (   stderr, "   out_uv_ph_y: output chroma phase shift in vertical   direction (default: 0)\n" );
    fprintf (   stderr, "\n\n");
    exit    (   1 );
  }
}


   


void updateCropParametersFromFile(ResizeParameters * rp, FILE * crop_file, int method, char* name)
{
  int crop_x0;
  int crop_y0;
  int crop_w;
  int crop_h;
  if ((fscanf(crop_file,"%d,%d,%d,%d\n", &crop_x0, &crop_y0, &crop_w,&crop_h))!=EOF)
  {
    rp->m_iPosX      = crop_x0;
    rp->m_iPosY      = crop_y0;
    rp->m_iOutWidth  = crop_w;
    rp->m_iOutHeight = crop_h;
  }
  
  print_usage_and_exit ((rp->m_iPosX&1||rp->m_iPosY&1||rp->m_iOutWidth&1||rp->m_iOutHeight&1), name, "Crop parameters must be event values");
  print_usage_and_exit (((method==2)&&((rp->m_iOutWidth != min(rp->m_iInWidth, rp->m_iGlobWidth))||(rp->m_iOutHeight != min(rp->m_iInHeight, rp->m_iGlobHeight)))), name, "Crop dimensions must be the same as the minimal dimensions");
  print_usage_and_exit ((rp->m_iOutWidth>max(rp->m_iInWidth,rp->m_iGlobWidth)||rp->m_iOutHeight>max(rp->m_iInHeight,rp->m_iGlobHeight)||rp->m_iOutWidth<min(rp->m_iInWidth,rp->m_iGlobWidth)||rp->m_iOutHeight<min(rp->m_iInHeight,rp->m_iGlobHeight)),name,"wrong crop window size");
  print_usage_and_exit (!((rp->m_iPosX+rp->m_iOutWidth)<=max(rp->m_iInWidth,rp->m_iGlobWidth)&&(rp->m_iPosY+rp->m_iOutHeight)<=max(rp->m_iInHeight,rp->m_iGlobHeight)),name,"wrong crop window size and origin");
}


int main(int argc, char *argv[])
{
  DownConvert   cDownConvert;
  ResizeParameters * rp = new ResizeParameters;
  
  rp->m_iInWidth                   = 0;
  rp->m_iInHeight                  = 0;
  rp->m_iGlobWidth                 = 0;
  rp->m_iGlobHeight                = 0;
  rp->m_iBaseChromaPhaseX          =-1;
  rp->m_iBaseChromaPhaseY          = 0;
  rp->m_iChromaPhaseX              =-1;
  rp->m_iChromaPhaseY              = 0;
  rp->m_iPosX                      = 0;
  rp->m_iPosY                      = 0;
  rp->m_iOutWidth                  = 0;
  rp->m_iOutHeight                 = 0;
  rp->m_iExtendedSpatialScalability= 0;
  rp->m_iPOC                       = 0;
  rp->m_pParamFile                 = 0;  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频你懂的| 欧美日韩视频不卡| 国产福利91精品| 国产麻豆9l精品三级站| 毛片av一区二区| 极品少妇xxxx精品少妇| 精品制服美女丁香| 久久www免费人成看片高清| 久久精品国产一区二区| 国产一区欧美一区| 91免费观看国产| 欧美精品乱码久久久久久按摩| 欧美高清精品3d| 久久久国产精品午夜一区ai换脸| 国产日韩精品一区二区三区在线| 亚洲欧美一区二区在线观看| 亚洲精品一二三| 麻豆一区二区99久久久久| 成人性视频免费网站| 欧美偷拍一区二区| 亚洲风情在线资源站| 成人一道本在线| 蜜桃av噜噜一区| 91啪九色porn原创视频在线观看| 欧美日韩五月天| 国产精品久久久久aaaa樱花 | 久久欧美中文字幕| 亚洲精品精品亚洲| 国产成人精品影视| 91精品国产综合久久久蜜臀粉嫩| 久久精品免费在线观看| 日韩精品一二三四| 欧美亚洲动漫制服丝袜| 国产午夜精品在线观看| 日本特黄久久久高潮| 色综合一个色综合| 国产精品久久久久久亚洲伦| 美女网站色91| 日韩午夜激情视频| 免费成人你懂的| 欧美一区二区日韩一区二区| 亚洲精品国产第一综合99久久| 国产91丝袜在线播放| 日韩精品一区二区三区在线播放 | 色伊人久久综合中文字幕| 亚洲国产电影在线观看| www.亚洲精品| 亚洲欧洲综合另类| 欧美性感一类影片在线播放| 国产精品久久久久久久久免费桃花 | 一区二区三区在线影院| aaa亚洲精品一二三区| 18成人在线视频| 91官网在线观看| 日本视频在线一区| 26uuu国产在线精品一区二区| 国产自产v一区二区三区c| 久久久国产一区二区三区四区小说| 国产福利91精品| 亚洲成精国产精品女| 精品久久久久久久久久久久久久久 | 成人激情文学综合网| 日韩美女精品在线| 91超碰这里只有精品国产| 精品在线视频一区| 亚洲视频香蕉人妖| 欧美电视剧免费观看| www.亚洲色图.com| 久久99久久精品欧美| 亚洲精品成人天堂一二三| 精品欧美一区二区久久| 99久久精品国产观看| 激情五月激情综合网| 一区二区视频在线看| 久久免费美女视频| 91精品国产91久久综合桃花| 成人蜜臀av电影| 国产制服丝袜一区| 美女网站一区二区| 男人操女人的视频在线观看欧美 | www.成人在线| 懂色一区二区三区免费观看| 免费观看日韩av| 无码av免费一区二区三区试看| 国产欧美一区二区精品性| 日韩一二三四区| 日韩欧美中文字幕一区| 欧美日韩国产综合视频在线观看| 一本大道久久a久久精二百| eeuss国产一区二区三区| 成人黄色软件下载| 99精品在线免费| 在线观看国产日韩| 蜜臀久久久久久久| jvid福利写真一区二区三区| 亚洲成人1区2区| 蜜桃传媒麻豆第一区在线观看| 日韩成人免费在线| 国产米奇在线777精品观看| 国产精品一区二区在线观看网站| 久久国产精品色婷婷| 不卡在线观看av| 精品视频全国免费看| 久久婷婷综合激情| 亚洲欧美一区二区三区孕妇| 视频一区二区欧美| 高清国产一区二区| 制服丝袜成人动漫| 国产欧美一区二区精品性色超碰| 亚洲激情成人在线| 精品亚洲国内自在自线福利| 99热99精品| 欧美精品一区二区三区久久久| 中文字幕亚洲综合久久菠萝蜜| 亚洲亚洲精品在线观看| 成人午夜视频在线| 欧美一区二区福利视频| 国产精品天干天干在线综合| 免费不卡在线观看| 欧美日本一道本在线视频| 欧美激情综合五月色丁香小说| 日韩国产欧美一区二区三区| 91在线观看视频| 欧美国产综合一区二区| 国产做a爰片久久毛片| 在线综合亚洲欧美在线视频| 一区二区高清在线| 成人短视频下载| 国产精品成人一区二区艾草| 国产高清在线观看免费不卡| 精品久久久久久综合日本欧美 | 国产成人亚洲精品青草天美| 91精品久久久久久蜜臀| 日日摸夜夜添夜夜添国产精品| 欧洲国内综合视频| 天天操天天综合网| 欧美日韩成人综合天天影院| 亚洲三级免费观看| 91丨国产丨九色丨pron| 亚洲欧美偷拍另类a∨色屁股| 成人v精品蜜桃久久一区| 国产精品久久久久精k8| 91农村精品一区二区在线| 亚洲欧美日韩中文播放| 欧美日韩三级视频| 国产永久精品大片wwwapp | 国内久久精品视频| 日本一区二区三区久久久久久久久不 | 91视频国产资源| 亚洲www啪成人一区二区麻豆| 欧美日韩在线不卡| 国产一区不卡在线| 亚洲自拍偷拍九九九| 日韩欧美亚洲国产精品字幕久久久| 免费久久99精品国产| 欧美国产欧美综合| 欧美老肥妇做.爰bbww| 国产精品一区二区在线观看不卡| 成人欧美一区二区三区白人| 欧美高清激情brazzers| 成人h版在线观看| 久久se精品一区精品二区| 亚洲精品写真福利| 久久久久久久综合色一本| 欧美性videosxxxxx| 99久久精品国产一区二区三区| 日韩激情一二三区| 亚洲国产精品一区二区久久恐怖片| 久久久久久久久久久久久久久99| 欧美影视一区在线| 99亚偷拍自图区亚洲| 91在线观看污| 亚洲精品免费在线观看| 久久久久久久综合色一本| 9191成人精品久久| 777午夜精品免费视频| 日本韩国欧美一区| 在线亚洲人成电影网站色www| 国产成人精品午夜视频免费| 激情av综合网| 激情五月婷婷综合网| 国产精品99久久久久久宅男| 国内精品伊人久久久久av影院| 日本网站在线观看一区二区三区| 亚洲一区成人在线| 午夜国产不卡在线观看视频| 亚洲午夜久久久| 蜜桃一区二区三区在线观看| 美国毛片一区二区三区| 国内精品伊人久久久久av影院| 国产一区二区影院| 99久久久精品| 6080日韩午夜伦伦午夜伦| 91麻豆6部合集magnet| 久久99精品国产麻豆不卡| 亚洲精品一二三区| 亚洲成人免费在线观看| 亚洲黄色性网站| 精品亚洲aⅴ乱码一区二区三区| 国产美女av一区二区三区|