亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产成人午夜精品影院观看视频 | 久久综合网色—综合色88| 中文字幕亚洲区| 国产麻豆精品视频| 日韩欧美黄色影院| 日本不卡一二三| 不卡视频免费播放| 欧美成人r级一区二区三区| 美女网站视频久久| 欧美成人官网二区| 国产在线麻豆精品观看| 精品国产一区二区三区久久影院| 日本特黄久久久高潮| 欧美精品三级日韩久久| 免费看精品久久片| 精品1区2区在线观看| 国产精品自拍av| 欧美国产成人精品| 国产高清不卡二三区| 精品动漫一区二区三区在线观看| 成人免费在线播放视频| 中文字幕欧美国产| 欧美日韩高清不卡| 欧美日韩精品专区| 欧美精品日韩一本| 精品99久久久久久| 中文字幕一区av| 午夜久久久久久| 91麻豆精品国产综合久久久久久| 亚洲国产电影在线观看| 色综合天天综合网天天看片| 日韩精品五月天| 26uuuu精品一区二区| 亚洲一区二区三区在线| 日本道在线观看一区二区| 91麻豆精品国产91久久久| 精品国产三级电影在线观看| 日韩伦理免费电影| 91麻豆国产在线观看| 日韩一区二区三区在线| 视频一区视频二区中文| 精品日韩一区二区三区免费视频| 激情文学综合插| 1区2区3区精品视频| 777午夜精品免费视频| 中文字幕一区二区三区四区不卡 | 国产亚洲欧美日韩俺去了| 国产一区二区三区四区在线观看 | 欧美日韩电影在线| 激情综合网最新| 综合欧美亚洲日本| 欧美xxxxxxxxx| 国产在线一区二区| 亚洲国产cao| 亚洲精品高清在线观看| 26uuu精品一区二区在线观看| 在线视频国内自拍亚洲视频| 国产一区二区三区黄视频 | 亚洲成av人片在线观看| 亚洲成国产人片在线观看| 一区二区高清免费观看影视大全| 国产91丝袜在线播放| 亚洲色欲色欲www在线观看| 日韩欧美亚洲另类制服综合在线| eeuss鲁一区二区三区| 日韩福利电影在线| 亚洲视频免费观看| 久久久久久久网| 色狠狠色狠狠综合| 亚洲人成影院在线观看| 26uuu精品一区二区| 欧美日韩一区二区三区不卡| 午夜在线成人av| 亚洲日本青草视频在线怡红院| 久久久久久免费| 欧美年轻男男videosbes| 国产成人av一区二区| 麻豆精品在线观看| 国产91精品欧美| 亚洲精品久久7777| 天天av天天翘天天综合网| 亚洲一区成人在线| 日韩高清在线电影| 久久精品国产网站| 国产伦精品一区二区三区免费| 国产a级毛片一区| av激情亚洲男人天堂| 在线免费观看日韩欧美| 欧美高清性hdvideosex| 精品免费国产一区二区三区四区| 日韩高清不卡在线| 欧美韩日一区二区三区四区| 国产精品午夜久久| 亚洲黄色小视频| 日韩av网站免费在线| 国产精品一区专区| 91视频免费观看| 91精品国产手机| 国产日韩精品一区二区浪潮av| 亚洲免费观看高清完整版在线观看熊| 亚洲成人三级小说| 奇米色777欧美一区二区| 国产福利视频一区二区三区| 日本道免费精品一区二区三区| 欧美精品在线一区二区| 久久亚洲一区二区三区明星换脸 | 99re成人精品视频| 欧美精品三级日韩久久| 中文av一区二区| 日日夜夜免费精品| www.在线欧美| 日韩久久免费av| 亚洲欧美aⅴ...| 国产一区二区在线观看免费| 欧美三级在线播放| 中文成人综合网| 韩国女主播一区| 欧美三级在线视频| 国产精品久久久久久久岛一牛影视| 无码av中文一区二区三区桃花岛| 懂色一区二区三区免费观看| 日韩一区二区中文字幕| 亚洲激情自拍视频| 国产福利一区二区三区在线视频| 91麻豆精品国产| 亚洲免费观看高清| 国内成人免费视频| 7799精品视频| 亚洲午夜精品网| av在线播放一区二区三区| 精品国产麻豆免费人成网站| 亚洲成人你懂的| 色综合天天狠狠| 亚洲国产精品99久久久久久久久| 久久成人免费网| 欧美人与禽zozo性伦| 亚洲精品成人在线| 99久免费精品视频在线观看| 久久综合九色综合欧美就去吻| 视频一区二区不卡| 欧美性猛交xxxxxx富婆| 亚洲人成电影网站色mp4| 国产成人av在线影院| 久久亚洲精品小早川怜子| 青青草伊人久久| 91麻豆精品国产91久久久久| 亚洲bt欧美bt精品| 欧美性生活影院| 亚洲福利视频一区| 欧美中文字幕一区| 一区二区三区国产精品| 91精品1区2区| 一区二区三区欧美在线观看| 91视视频在线观看入口直接观看www | 自拍偷拍亚洲激情| 懂色av一区二区三区免费观看| 2020国产精品自拍| 久久99热国产| 亚洲精品在线一区二区| 久国产精品韩国三级视频| 日韩免费观看高清完整版在线观看| 日韩影院在线观看| 欧美一区二区福利视频| 日韩成人一区二区三区在线观看| 在线播放一区二区三区| 日韩在线卡一卡二| 日韩一区二区在线观看视频| 蜜臀99久久精品久久久久久软件| 91精品婷婷国产综合久久性色| 午夜电影久久久| 日韩一区二区在线观看| 激情偷乱视频一区二区三区| 国产视频一区二区在线| 北岛玲一区二区三区四区| 亚洲蜜臀av乱码久久精品蜜桃| 色婷婷久久久综合中文字幕 | 国产色一区二区| 不卡av在线网| 亚洲一二三四在线| 欧美一级理论片| 国产乱码精品一品二品| 国产精品高清亚洲| 色国产精品一区在线观看| 天堂精品中文字幕在线| 欧美成人在线直播| 国产精品一区二区在线看| 国产日韩精品久久久| 色老汉av一区二区三区| 奇米色一区二区| 久久先锋影音av鲁色资源网| 成人自拍视频在线| 亚洲黄一区二区三区| 欧美tk—视频vk| 国产精品亚洲视频| 亚洲精品视频在线观看免费| 欧美精品久久天天躁| 国产精品亚洲专一区二区三区 | 国产美女在线观看一区| 亚洲欧洲精品成人久久奇米网| 欧美三区免费完整视频在线观看|