1 /* babl - dynamically extendable universal pixel conversion library. 2 * Copyright (C) 2005, Øyvind Kolås. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 3 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General 15 * Public License along with this library; if not, see 16 * <https://www.gnu.org/licenses/>. 17 */ 18 19 #include "config.h" 20 #include "babl-base.h" 21 22 extern int babl_hmpf_on_name_lookups; 23 24 static void types (void); 25 static void models (void); 26 27 void babl_base_init(void)28babl_base_init (void) 29 { 30 babl_hmpf_on_name_lookups++; 31 32 types (); 33 models (); 34 babl_formats_init (); 35 36 babl_hmpf_on_name_lookups--; 37 } 38 39 void babl_base_destroy(void)40babl_base_destroy (void) 41 { 42 /* done by the destruction of the elemental babl clases */ 43 } 44 45 /* 46 * types 47 */ 48 49 50 static void types(void)51types (void) 52 { 53 babl_base_type_float (); 54 babl_base_type_u15 (); 55 babl_base_type_half (); 56 babl_base_type_u8 (); 57 babl_base_type_u16 (); 58 babl_base_type_u32 (); 59 } 60 61 /* 62 * models 63 */ 64 65 66 static void models(void)67models (void) 68 { 69 babl_hmpf_on_name_lookups--; 70 babl_base_model_rgb (); 71 babl_base_model_gray (); 72 babl_base_model_cmyk (); 73 babl_hmpf_on_name_lookups++; 74 babl_base_model_ycbcr (); 75 } 76