mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-27 22:04:17 +01:00
Move bitstream to FasTC base lib
This commit is contained in:
parent
f12ee09f7e
commit
ea953979fe
@ -106,7 +106,6 @@ SET( HEADERS
|
||||
config/BPTCConfig.h.in
|
||||
include/BPTCCompressor.h
|
||||
src/CompressionMode.h
|
||||
src/BitStream.h
|
||||
src/RGBAEndpoints.h
|
||||
src/ParallelStage.h
|
||||
)
|
||||
|
@ -78,7 +78,9 @@
|
||||
|
||||
#include "RGBAEndpoints.h"
|
||||
|
||||
class BitStream;
|
||||
namespace FasTC {
|
||||
class BitStream;
|
||||
} // namespace FasTC
|
||||
|
||||
namespace BPTCC {
|
||||
|
||||
@ -113,7 +115,7 @@ class CompressionMode {
|
||||
|
||||
// This function compresses a group of clusters into the passed bitstream. The
|
||||
// size of the clusters array is determined by the BC7 compression mode.
|
||||
double Compress(BitStream &stream,
|
||||
double Compress(FasTC::BitStream &stream,
|
||||
const int shapeIdx, const RGBACluster *clusters);
|
||||
|
||||
// This switch controls the quality of the simulated annealing optimizer. We
|
||||
|
@ -79,7 +79,10 @@
|
||||
#include "TexCompTypes.h"
|
||||
#include "BCLookupTables.h"
|
||||
#include "RGBAEndpoints.h"
|
||||
|
||||
#include "BitStream.h"
|
||||
using FasTC::BitStream;
|
||||
using FasTC::BitStreamReadOnly;
|
||||
|
||||
#ifdef HAS_MSVC_ATOMICS
|
||||
# include "Windows.h"
|
||||
|
@ -58,6 +58,7 @@ SET( SOURCES
|
||||
)
|
||||
|
||||
SET( HEADERS
|
||||
"include/BitStream.h"
|
||||
"include/TexCompTypes.h"
|
||||
"include/Image.h"
|
||||
"include/Color.h"
|
||||
|
@ -1,30 +1,39 @@
|
||||
/* FasTC
|
||||
* Copyright (c) 2012 University of North Carolina at Chapel Hill. All rights reserved.
|
||||
* Copyright (c) 2012 University of North Carolina at Chapel Hill.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its documentation for educational,
|
||||
* research, and non-profit purposes, without fee, and without a written agreement is hereby granted,
|
||||
* provided that the above copyright notice, this paragraph, and the following four paragraphs appear
|
||||
* in all copies.
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for educational, research, and non-profit purposes, without
|
||||
* fee, and without a written agreement is hereby granted, provided that the
|
||||
* above copyright notice, this paragraph, and the following four paragraphs
|
||||
* appear in all copies.
|
||||
*
|
||||
* Permission to incorporate this software into commercial products may be obtained by contacting the
|
||||
* authors or the Office of Technology Development at the University of North Carolina at Chapel Hill <otd@unc.edu>.
|
||||
* Permission to incorporate this software into commercial products may be
|
||||
* obtained by contacting the authors or the Office of Technology Development
|
||||
* at the University of North Carolina at Chapel Hill <otd@unc.edu>.
|
||||
*
|
||||
* This software program and documentation are copyrighted by the University of North Carolina at Chapel Hill.
|
||||
* The software program and documentation are supplied "as is," without any accompanying services from the
|
||||
* University of North Carolina at Chapel Hill or the authors. The University of North Carolina at Chapel Hill
|
||||
* and the authors do not warrant that the operation of the program will be uninterrupted or error-free. The
|
||||
* end-user understands that the program was developed for research purposes and is advised not to rely
|
||||
* exclusively on the program for any reason.
|
||||
* This software program and documentation are copyrighted by the University of
|
||||
* North Carolina at Chapel Hill. The software program and documentation are
|
||||
* supplied "as is," without any accompanying services from the University of
|
||||
* North Carolina at Chapel Hill or the authors. The University of North
|
||||
* Carolina at Chapel Hill and the authors do not warrant that the operation of
|
||||
* the program will be uninterrupted or error-free. The end-user understands
|
||||
* that the program was developed for research purposes and is advised not to
|
||||
* rely exclusively on the program for any reason.
|
||||
*
|
||||
* IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE AUTHORS BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE
|
||||
* USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
|
||||
* AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
|
||||
* AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
|
||||
* OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF
|
||||
* THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA
|
||||
* AT CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
* DAMAGE.
|
||||
*
|
||||
* THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY
|
||||
* STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY
|
||||
* OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
|
||||
* THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY
|
||||
* DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY
|
||||
* STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON
|
||||
* AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND
|
||||
* THE AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
|
||||
* ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* Please send all BUG REPORTS to <pavel@cs.unc.edu>.
|
||||
@ -46,25 +55,28 @@
|
||||
//
|
||||
// This code has been modified significantly from the original.
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright 2011 Intel Corporation
|
||||
// All Rights Reserved
|
||||
//
|
||||
// Permission is granted to use, copy, distribute and prepare derivative works of this
|
||||
// software for any purpose and without fee, provided, that the above copyright notice
|
||||
// and this statement appear in all copies. Intel makes no representations about the
|
||||
// suitability of this software for any purpose. THIS SOFTWARE IS PROVIDED "AS IS."
|
||||
// INTEL SPECIFICALLY DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, AND ALL LIABILITY,
|
||||
// INCLUDING CONSEQUENTIAL AND OTHER INDIRECT DAMAGES, FOR THE USE OF THIS SOFTWARE,
|
||||
// INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PROPRIETARY RIGHTS, AND INCLUDING THE
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Intel does not
|
||||
// assume any responsibility for any errors which may appear in this software nor any
|
||||
// Permission is granted to use, copy, distribute and prepare derivative works
|
||||
// of this software for any purpose and without fee, provided, that the above
|
||||
// copyright notice and this statement appear in all copies. Intel makes no
|
||||
// representations about the suitability of this software for any purpose. THIS
|
||||
// SOFTWARE IS PROVIDED "AS IS." INTEL SPECIFICALLY DISCLAIMS ALL WARRANTIES,
|
||||
// EXPRESS OR IMPLIED, AND ALL LIABILITY, INCLUDING CONSEQUENTIAL AND OTHER
|
||||
// INDIRECT DAMAGES, FOR THE USE OF THIS SOFTWARE, INCLUDING LIABILITY FOR
|
||||
// INFRINGEMENT OF ANY PROPRIETARY RIGHTS, AND INCLUDING THE WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Intel does not assume
|
||||
// any responsibility for any errors which may appear in this software nor any
|
||||
// responsibility to update it.
|
||||
//
|
||||
//--------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __BITSTREAM_H__
|
||||
#define __BITSTREAM_H__
|
||||
#ifndef __BASE_INCLUDE_BITSTREAM_H__
|
||||
#define __BASE_INCLUDE_BITSTREAM_H__
|
||||
|
||||
namespace FasTC {
|
||||
|
||||
class BitStream {
|
||||
public:
|
||||
@ -158,4 +170,7 @@ class BitStreamReadOnly {
|
||||
const unsigned char *m_CurByte;
|
||||
int m_NextBit;
|
||||
};
|
||||
#endif //__BITSTREAM_H__
|
||||
|
||||
} // namespace FasTC
|
||||
|
||||
#endif //__BASE_INCLUDE_BITSTREAM_H__
|
Loading…
Reference in New Issue
Block a user