1    if(fx_vce.dot_clock) // No cellophane in 7.16MHz pixel mode
2    {
3     if(HighDotClockWidth == 341)
4      for(unsigned int x = 0; x < 341; x++)
5      {
6       LAYER_MIX_BODY(x * 256 / 341, x);
7       LAYER_MIX_FINAL_NOCELLO;
8      }
9     else if(HighDotClockWidth == 256)
10      for(unsigned int x = 0; x < 256; x++)
11      {
12       LAYER_MIX_BODY(x, x * 341 / 256);
13       LAYER_MIX_FINAL_NOCELLO;
14      }
15     else
16      for(unsigned int x = 0; x < 1024; x++)
17      {
18       LAYER_MIX_BODY(x / 4, x / 3);
19       LAYER_MIX_FINAL_NOCELLO;
20      }
21    }
22    else if((vce_rendercache.BLE & 0xC000) == 0xC000) // Front cellophane
23    {
24     uint8 CCR_Y_front = vce_rendercache.coefficient_mul_table_y[(vce_rendercache.coefficients[0] >> 8) & 0xF][(vce_rendercache.CCR >> 8) & 0xFF];
25     int8 CCR_U_front = vce_rendercache.coefficient_mul_table_uv[(vce_rendercache.coefficients[0] >> 4) & 0xF][(vce_rendercache.CCR & 0xF0)];
26     int8 CCR_V_front = vce_rendercache.coefficient_mul_table_uv[(vce_rendercache.coefficients[0] >> 0) & 0xF][(vce_rendercache.CCR << 4) & 0xF0];
27
28     BPC_Cache = 0x008080 | (LAYER_NONE << 28);
29
30     for(unsigned int x = 0; x < 256; x++)
31     {
32      LAYER_MIX_BODY(x, x);
33      LAYER_MIX_FINAL_FRONT_CELLO;
34     }
35    }
36    else if((vce_rendercache.BLE & 0xC000) == 0x4000) // Back cellophane
37    {
38     BPC_Cache = ((vce_rendercache.CCR & 0xFF00) << 8) | ((vce_rendercache.CCR & 0xF0) << 8) | ((vce_rendercache.CCR & 0x0F) << 4) | (LAYER_NONE << 28);
39
40     for(unsigned int x = 0; x < 256; x++)
41     {
42      LAYER_MIX_BODY(x, x);
43      LAYER_MIX_FINAL_BACK_CELLO;
44     }
45    }
46    else if(ble_cache_any)		     // No front/back cello, but cellophane on at least 1 layer
47    {
48     for(unsigned int x = 0; x < 256; x++)
49     {
50      LAYER_MIX_BODY(x, x);
51      LAYER_MIX_FINAL_CELLO
52     }
53    }
54    else				     // No cellophane at all
55    {
56     for(unsigned int x = 0; x < 256; x++)
57     {
58      LAYER_MIX_BODY(x, x);
59      LAYER_MIX_FINAL_NOCELLO
60     }
61    }
62
63