patch_dct.cpp File Reference

DCT patch. More...

#include "linden_common.h"
#include "llmath.h"
#include "v3math.h"
#include "patch_dct.h"

Include dependency graph for patch_dct.cpp:

Go to the source code of this file.

Classes

struct  s_patch_compress_global_data

Typedefs

typedef s_patch_compress_global_data PCGD

Functions

void reset_patch_compressor (void)
void build_patch_quantize_table (S32 size)
void setup_patch_cosines (S32 size)
void build_copy_matrix (S32 size)
void init_patch_compressor (S32 patch_size, S32 patch_stride, S32 layer_type)
void prescan_patch (F32 *patch, LLPatchHeader *php, F32 &zmax, F32 &zmin)
void dct_line (F32 *linein, F32 *lineout, S32 line)
void dct_line_large (F32 *linein, F32 *lineout, S32 line)
void dct_column (F32 *linein, S32 *lineout, S32 column)
void dct_column_large (F32 *linein, S32 *lineout, S32 column)
void dct_patch (F32 *block, S32 *cpatch)
void dct_patch_large (F32 *block, S32 *cpatch)
void compress_patch (F32 *patch, S32 *cpatch, LLPatchHeader *php, S32 prequant)
void get_patch_group_header (LLGroupHeader *gopp)

Variables

PCGD gPatchCompressGlobalData
S32 gCurrentSize = 0
F32 gPatchQuantizeTable [LARGE_PATCH_SIZE *LARGE_PATCH_SIZE]
F32 gPatchCosines [LARGE_PATCH_SIZE *LARGE_PATCH_SIZE]
S32 gCopyMatrix [LARGE_PATCH_SIZE *LARGE_PATCH_SIZE]


Detailed Description

DCT patch.

LicenseInfo
firstyear=2000&license=viewergpl

Copyright (c) 2000-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file patch_dct.cpp.


Typedef Documentation

typedef struct s_patch_compress_global_data PCGD


Function Documentation

void build_copy_matrix ( S32  size  ) 

Definition at line 90 of file patch_dct.cpp.

References count, FALSE, gCopyMatrix, i, j, S32, and TRUE.

Referenced by init_patch_compressor().

void build_patch_quantize_table ( S32  size  ) 

Definition at line 60 of file patch_dct.cpp.

References f, gPatchQuantizeTable, i, j, and S32.

Referenced by init_patch_compressor().

void compress_patch ( F32 patch,
S32 cpatch,
LLPatchHeader php,
S32  prequant 
)

Definition at line 729 of file patch_dct.cpp.

References LLPatchHeader::dc_offset, dct_patch(), dct_patch_large(), gPatchCompressGlobalData, i, j, LARGE_PATCH_SIZE, s_patch_compress_global_data::patch_size, s_patch_compress_global_data::patch_stride, LLPatchHeader::quant_wbits, LLPatchHeader::range, range, S32, size, and stride.

void dct_column ( F32 linein,
S32 lineout,
S32  column 
) [inline]

Definition at line 390 of file patch_dct.cpp.

References f, gCopyMatrix, gPatchCompressGlobalData, gPatchCosines, gPatchQuantizeTable, n, NORMAL_PATCH_SIZE, OO_SQRT2, s_patch_compress_global_data::patch_size, S32, size, and u.

Referenced by dct_patch().

void dct_column_large ( F32 linein,
S32 lineout,
S32  column 
) [inline]

Definition at line 479 of file patch_dct.cpp.

References gCopyMatrix, gPatchCosines, gPatchQuantizeTable, LARGE_PATCH_SIZE, OO_SQRT2, S32, and u.

Referenced by dct_patch_large().

void dct_line ( F32 linein,
F32 lineout,
S32  line 
)

Definition at line 205 of file patch_dct.cpp.

References f, gPatchCompressGlobalData, gPatchCosines, n, NORMAL_PATCH_SIZE, OO_SQRT2, s_patch_compress_global_data::patch_size, S32, size, and u.

Referenced by dct_patch().

void dct_line_large ( F32 linein,
F32 lineout,
S32  line 
)

Definition at line 288 of file patch_dct.cpp.

References gPatchCosines, LARGE_PATCH_SIZE, OO_SQRT2, S32, and u.

Referenced by dct_patch_large().

void dct_patch ( F32 block,
S32 cpatch 
) [inline]

Definition at line 586 of file patch_dct.cpp.

References dct_column(), dct_line(), gPatchCompressGlobalData, i, NORMAL_PATCH_SIZE, s_patch_compress_global_data::patch_size, S32, and size.

Referenced by compress_patch().

void dct_patch_large ( F32 block,
S32 cpatch 
) [inline]

Definition at line 644 of file patch_dct.cpp.

References dct_column_large(), dct_line_large(), and LARGE_PATCH_SIZE.

Referenced by compress_patch().

void get_patch_group_header ( LLGroupHeader gopp  ) 

Definition at line 768 of file patch_dct.cpp.

References gPatchCompressGlobalData, LLGroupHeader::layer_type, s_patch_compress_global_data::layer_type, LLGroupHeader::patch_size, s_patch_compress_global_data::patch_size, s_patch_compress_global_data::patch_stride, and LLGroupHeader::stride.

void init_patch_compressor ( S32  patch_size,
S32  patch_stride,
S32  layer_type 
)

Definition at line 155 of file patch_dct.cpp.

References build_copy_matrix(), build_patch_quantize_table(), s_patch_compress_global_data::charptr, gCurrentSize, gPatchCompressGlobalData, s_patch_compress_global_data::layer_type, s_patch_compress_global_data::patch_size, s_patch_compress_global_data::patch_stride, and setup_patch_cosines().

void prescan_patch ( F32 patch,
LLPatchHeader php,
F32 zmax,
F32 zmin 
)

Definition at line 174 of file patch_dct.cpp.

References LLPatchHeader::dc_offset, f, gPatchCompressGlobalData, i, j, s_patch_compress_global_data::patch_size, s_patch_compress_global_data::patch_stride, LLPatchHeader::range, S32, size, and stride.

void reset_patch_compressor ( void   ) 

Definition at line 49 of file patch_dct.cpp.

References s_patch_compress_global_data::charptr, and gPatchCompressGlobalData.

void setup_patch_cosines ( S32  size  ) 

Definition at line 74 of file patch_dct.cpp.

References cosf, f, F_PI, gPatchCosines, n, S32, and u.

Referenced by init_patch_compressor().


Variable Documentation

S32 gCopyMatrix[LARGE_PATCH_SIZE *LARGE_PATCH_SIZE]

Definition at line 88 of file patch_dct.cpp.

Referenced by build_copy_matrix(), dct_column(), and dct_column_large().

S32 gCurrentSize = 0

Definition at line 56 of file patch_dct.cpp.

Referenced by init_patch_compressor().

PCGD gPatchCompressGlobalData

Definition at line 47 of file patch_dct.cpp.

Referenced by compress_patch(), dct_column(), dct_line(), dct_patch(), get_patch_group_header(), init_patch_compressor(), prescan_patch(), and reset_patch_compressor().

F32 gPatchCosines[LARGE_PATCH_SIZE *LARGE_PATCH_SIZE]

Definition at line 72 of file patch_dct.cpp.

Referenced by dct_column(), dct_column_large(), dct_line(), dct_line_large(), and setup_patch_cosines().

F32 gPatchQuantizeTable[LARGE_PATCH_SIZE *LARGE_PATCH_SIZE]

Definition at line 58 of file patch_dct.cpp.

Referenced by build_patch_quantize_table(), dct_column(), and dct_column_large().


Generated on Thu Jul 1 06:10:56 2010 for Second Life Viewer by  doxygen 1.4.7