資源簡介
IQA是一個計算圖像/視頻質量的基于C語言的庫。
里面包含了源代碼。

代碼片段和文件信息
/*
?*?Copyright?(c)?2011?Tom?Distler?(http://tdistler.com)
?*?All?rights?reserved.
?*
?*?The?BSD?License
?*
?*?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?*?modification?are?permitted?provided?that?the?following?conditions?are?met:
?*
?*?-?Redistributions?of?source?code?must?retain?the?above?copyright?notice?
?*???this?list?of?conditions?and?the?following?disclaimer.
?*
?*?-?Redistributions?in?binary?form?must?reproduce?the?above?copyright?notice
?*???this?list?of?conditions?and?the?following?disclaimer?in?the?documentation
?*???and/or?other?materials?provided?with?the?distribution.
?*
?*?-?Neither?the?name?of?the?tdistler.com?nor?the?names?of?its?contributors?may
?*???be?used?to?endorse?or?promote?products?derived?from?this?software?without
?*???specific?prior?written?permission.
?*
?*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS?“AS?IS“
?*?AND?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE
?*?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE
?*?ARE?DISCLAIMED.?IN?NO?EVENT?SHALL?THE?COPYRIGHT?HOLDER?OR?CONTRIBUTORS?BE?
?*?LIABLE?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY?OR?
?*?CONSEQUENTIAL?DAMAGES?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?OF
?*?SUBSTITUTE?GOODS?OR?SERVICES;?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS
?*?INTERRUPTION)?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN
?*?CONTRACT?STRICT?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)
?*?ARISING?IN?ANY?WAY?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE
?*?POSSIBILITY?OF?SUCH?DAMAGE.
?*/
#include?“convolve.h“
#include?
float?KBND_SYMMETRIC(const?float?*img?int?w?int?h?int?x?int?y?float?bnd_const)
{
????if?(x<0)?x=-1-x;
????else?if?(x>=w)?x=(w-(x-w))-1;
????if?(y<0)?y=-1-y;
????else?if?(y>=h)?y=(h-(y-h))-1;
????return?img[y*w?+?x];
}
float?KBND_REPLICATE(const?float?*img?int?w?int?h?int?x?int?y?float?bnd_const)
{
????if?(x<0)?x=0;
????if?(x>=w)?x=w-1;
????if?(y<0)?y=0;
????if?(y>=h)?y=h-1;
????return?img[y*w?+?x];
}
float?KBND_CONSTANT(const?float?*img?int?w?int?h?int?x?int?y?float?bnd_const)
{
????if?(x<0)?x=0;
????if?(y<0)?y=0;
????if?(x>=w?||?y>=h)
????????return?bnd_const;
????return?img[y*w?+?x];
}
static?float?_calc_scale(const?struct?_kernel?*k)
{
????int?iik_len;
????double?sum=0.0;
????if?(k->normalized)
????????return?1.0f;
????else?{
????????k_len?=?k->w?*?k->h;
????????for?(ii=0;?ii ????????????sum?+=?k->kernel[ii];
????????if?(sum?!=?0.0)
????????????return?(float)(1.0?/?sum);
????????return?1.0f;
????}
}
void?_iqa_convolve(float?*img?int?w?int?h?const?struct?_kernel?*k?float?*result?int?*rw?int?*rh)
{
????int?xykxkyuv;
????int?uc?=?k->w/2;
????int?vc?=?k->h/2;
????int?kw_even?=?(k->w&1)?0:1;
????int?kh_even?=?(k->h&1)?0:1;
????int?dst_w?=?w?-?k->w?+?1;
????int?dst_h?=?h?-?k->h?+?1;
????i
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-07-06?11:48??iqa_1.1.2\build\
?????文件?????????998??2011-07-05?14:42??iqa_1.1.2\CHANGELOG.txt
?????目錄???????????0??2011-07-06?11:48??iqa_1.1.2\doc\
?????文件????????6080??2011-07-05?14:42??iqa_1.1.2\doc\algorithms.h
?????文件????????2758??2011-07-05?14:42??iqa_1.1.2\doc\build.h
?????文件?????????478??2011-07-05?14:42??iqa_1.1.2\doc\footer.html
?????文件????????3354??2011-07-05?14:42??iqa_1.1.2\doc\mainpage.h
?????文件????????3298??2011-07-05?14:42??iqa_1.1.2\doc\sample_code.h
?????文件???????74605??2011-07-05?14:42??iqa_1.1.2\Doxyfile
?????目錄???????????0??2011-07-06?11:48??iqa_1.1.2\include\
?????文件????????5238??2011-07-05?14:42??iqa_1.1.2\include\convolve.h
?????文件????????2448??2011-07-05?14:42??iqa_1.1.2\include\decimate.h
?????文件????????6175??2011-07-05?14:42??iqa_1.1.2\include\iqa.h
?????文件????????2486??2011-07-05?14:42??iqa_1.1.2\include\iqa_os.h
?????文件????????2409??2011-07-05?14:42??iqa_1.1.2\include\math_utils.h
?????文件????????5966??2011-07-05?14:42??iqa_1.1.2\include\ssim.h
?????文件????????2130??2011-07-05?14:42??iqa_1.1.2\iqa.sln
?????文件????????7651??2011-07-05?14:42??iqa_1.1.2\iqa.vcproj
?????文件?????????607??2011-07-05?14:42??iqa_1.1.2\Makefile
?????文件????????1231??2011-07-05?14:42??iqa_1.1.2\README.txt
?????目錄???????????0??2011-07-06?11:48??iqa_1.1.2\resources\
?????文件???????42236??2011-07-05?14:42??iqa_1.1.2\resources\iqa_logo.bmp
?????文件????????4810??2011-07-05?14:42??iqa_1.1.2\resources\iqa_logo.jpg
?????文件????????8980??2011-07-05?14:42??iqa_1.1.2\resources\mse_eq.jpg
?????文件???????11380??2011-07-05?14:42??iqa_1.1.2\resources\psnr_eq.jpg
?????目錄???????????0??2011-07-06?11:48??iqa_1.1.2\source\
?????文件????????5813??2011-07-05?14:42??iqa_1.1.2\source\convolve.c
?????文件????????2281??2011-07-05?14:42??iqa_1.1.2\source\decimate.c
?????文件????????2686??2011-07-05?14:42??iqa_1.1.2\source\math_utils.c
?????文件????????9540??2011-07-05?14:42??iqa_1.1.2\source\ms_ssim.c
?????文件????????2135??2011-07-05?14:42??iqa_1.1.2\source\mse.c
............此處省略45個文件信息
- 上一篇:Socket文件傳輸
- 下一篇:MPEG2-TS格式分析工具 1.1 源代碼
評論
共有 條評論