| 20 | |
| 21 | template <typename IO> |
| 22 | std::unique_ptr<Transform<IO>> create_transform(const std::string &desc) { |
| 23 | if (desc == "YCoCg") |
| 24 | return make_unique<TransformYCoCg<IO>>(); |
| 25 | // use this if you just want to quickly try YC1C2 |
| 26 | // return new TransformYCC<IO>(); |
| 27 | if (desc == "Bounds") |
| 28 | return make_unique<TransformBounds<IO>>(); |
| 29 | if (desc == "PermutePlanes") |
| 30 | return make_unique<TransformPermute<IO>>(); |
| 31 | if (desc == "Color_Buckets") |
| 32 | return make_unique<TransformCB<IO>>(); |
| 33 | if (desc == "Palette") |
| 34 | return make_unique<TransformPalette<IO>>(); |
| 35 | if (desc == "Palette_Alpha") |
| 36 | return make_unique<TransformPaletteA<IO>>(); |
| 37 | // if (desc == "Palette_Chroma") // turned out to be useless |
| 38 | // return make_unique<TransformPaletteCoCg<IO>>(); |
| 39 | if (desc == "Channel_Compact") |
| 40 | return make_unique<TransformPaletteC<IO>>(); |
| 41 | #ifdef SUPPORT_ANIMATION |
| 42 | if (desc == "Frame_Shape") |
| 43 | return make_unique<TransformFrameShape<IO>>(); |
| 44 | if (desc == "Duplicate_Frame") |
| 45 | return make_unique<TransformFrameDup<IO>>(); |
| 46 | if (desc == "Frame_Lookback") |
| 47 | return make_unique<TransformFrameCombine<IO>>(); |
| 48 | #endif |
| 49 | // if (desc == "DCT") |
| 50 | // return make_unique<TransformDCT<IO>>(); |
| 51 | return NULL; |
| 52 | } |
| 53 | |
| 54 | template std::unique_ptr<Transform<FileIO>> create_transform(const std::string &desc); |
| 55 | template std::unique_ptr<Transform<BlobReader>> create_transform(const std::string &desc); |
nothing calls this directly
no outgoing calls
no test coverage detected