MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / CreateCodec

Function CreateCodec

cmp_compressonatorlib/common/codec.cpp:177–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177CCodec* CreateCodec(CodecType nCodecType)
178{
179#ifdef USE_DBGTRACE
180 DbgTrace(("nCodecType %d", nCodecType));
181#endif
182 switch (nCodecType)
183 {
184 case CT_DXT1:
185 return new CCodec_DXT1;
186 case CT_DXT3:
187 return new CCodec_DXT3;
188 case CT_DXT5:
189 return new CCodec_DXT5;
190 case CT_DXT5_xGBR:
191 return new CCodec_DXT5_xGBR;
192 case CT_DXT5_RxBG:
193 return new CCodec_DXT5_RxBG;
194 case CT_DXT5_RBxG:
195 return new CCodec_DXT5_RBxG;
196 case CT_DXT5_xRBG:
197 return new CCodec_DXT5_xRBG;
198 case CT_DXT5_RGxB:
199 return new CCodec_DXT5_RGxB;
200 case CT_DXT5_xGxR:
201 return new CCodec_DXT5_xGxR;
202 case CT_ATI1N:
203 return new CCodec_ATI1N;
204 case CT_ATI1N_S:
205 return new CCodec_ATI1N_S;
206 case CT_ATI2N:
207 return new CCodec_ATI2N;
208 case CT_ATI2N_S:
209 return new CCodec_ATI2N_S;
210 case CT_ATI2N_XY:
211 return new CCodec_ATI2N(CT_ATI2N_XY);
212 case CT_ATI2N_XY_S:
213 return new CCodec_ATI2N_S(CT_ATI2N_XY_S);
214 case CT_ATI2N_DXT5:
215 return new CCodec_ATI2N_DXT5;
216 case CT_ATC_RGB:
217 return new CCodec_ATC_RGB;
218 case CT_ATC_RGBA_Explicit:
219 return new CCodec_ATC_RGBA_Explicit;
220 case CT_ATC_RGBA_Interpolated:
221 return new CCodec_ATC_RGBA_Interpolated;
222 case CT_ETC_RGB:
223 return new CCodec_ETC_RGB;
224 case CT_ETC2_RGB:
225 case CT_ETC2_SRGB:
226 return new CCodec_ETC2_RGB(nCodecType);
227 case CT_ETC2_RGBA:
228 case CT_ETC2_SRGBA:
229 return new CCodec_ETC2_RGBA(nCodecType);
230 case CT_ETC2_RGBA1:
231 case CT_ETC2_SRGBA1:
232 return new CCodec_ETC2_RGBA1(nCodecType);
233 case CT_BC6H:
234 case CT_BC6H_SF:

Callers 4

CodecCompressTextureFunction · 0.85
CodecDecompressTextureFunction · 0.85
CMP_ConvertTextureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected