Changeset 2fe64d0 in mainline
- Timestamp:
- 2012-08-08T09:38:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0da6c04
- Parents:
- 18d4484
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/dist/src/bithenge/gif/gif.bh
r18d4484 r2fe64d0 51 51 }; 52 52 53 transform gif_color_map_from_bits_per_pixel(bits_per_pixel _minus_one) = struct {53 transform gif_color_map_from_bits_per_pixel(bits_per_pixel) = struct { 54 54 # We need to emulate missing << operator 55 switch (bits_per_pixel _minus_one) {56 0: { <- gif_color_map(2); };57 1: { <- gif_color_map(4); };58 2: { <- gif_color_map(8); };59 3: { <- gif_color_map(16); };60 4: { <- gif_color_map(32); };61 5: { <- gif_color_map(64); };62 6: { <- gif_color_map(128); };63 7: { <- gif_color_map(256); };55 switch (bits_per_pixel) { 56 1: { <- gif_color_map(2); }; 57 2: { <- gif_color_map(4); }; 58 3: { <- gif_color_map(8); }; 59 4: { <- gif_color_map(16); }; 60 5: { <- gif_color_map(32); }; 61 6: { <- gif_color_map(64); }; 62 7: { <- gif_color_map(128); }; 63 8: { <- gif_color_map(256); }; 64 64 } 65 65 }; … … 91 91 .interlacing <- bit; 92 92 .reserved_bits <- uint_be(3); 93 .bits_per_pixel _minus_one<- uint_be(3);93 .bits_per_pixel <- (in + 1) <- uint_be(3); 94 94 } <- bits_be <- known_length(1); 95 95 96 96 if (.use_local_color_map) { 97 .local_color_map <- gif_color_map_from_bits_per_pixel(.bits_per_pixel _minus_one);97 .local_color_map <- gif_color_map_from_bits_per_pixel(.bits_per_pixel); 98 98 } 99 99 … … 136 136 .color_resolution <- uint_be(3); 137 137 .reserved_bit <- uint_be(1); 138 .bits_per_pixel _minus_one<- uint_be(3);138 .bits_per_pixel <- (in + 1) <- uint_be(3); 139 139 } <- bits_be <- known_length(1); 140 140 .background_color_index <- uint8; 141 141 .reserved <- uint8; 142 142 if (.global_color_map_exists) { 143 .global_color_map <- gif_color_map_from_bits_per_pixel(.bits_per_pixel _minus_one);143 .global_color_map <- gif_color_map_from_bits_per_pixel(.bits_per_pixel); 144 144 } 145 145 .blocks <- repeat {
Note:
See TracChangeset
for help on using the changeset viewer.