Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ;---------------------------------------------------------------------
  2. align 4        
  3. .check_filtering_24:
  4.         cmp  [filtering],0
  5.         je   .24_1
  6.        
  7.         mov  ebx,[temp_y1]
  8.         inc  ebx
  9.         cmp  ebx,[y]
  10.         jae   .last_y_24  ;.24_1
  11.        
  12.         mov  ebx,[temp_x1]
  13.         push eax
  14.         mov  eax,[x]
  15.         dec  eax
  16.         lea  eax,[eax*3]
  17.         cmp  ebx,eax
  18.         pop  eax
  19.         jae   .last_x_24 ;.24_1
  20.  
  21. ;       mov  ebx,[esp+4]
  22. ;;      test ebx,ebx
  23. ;;      jz   .24_1
  24. ;       inc  ebx
  25. ;       cmp  bx,[new_size.y1]
  26. ;       jae   .last_y  ;.24_1
  27.  
  28. ;       mov  ebx,[esp]
  29. ;;      test ebx,ebx
  30. ;;      jz   .24_1
  31. ;       inc  ebx
  32. ;       cmp  bx,[new_size.x1]
  33. ;       jae   .last_x  ;.24_1
  34.  
  35. ;----------------------------  
  36.         call .clear_RGB
  37.         mov edx,128 ;100
  38.         sub edx,[next_pixel_x]
  39.         call  .mix_RGB
  40.        
  41.         mov  edx,[next_pixel_x]
  42.         mov  eax,[ecx+3]
  43.         call  .mix_RGB
  44. ;----------------------------  
  45.         call  .copy_RGB_to_RGB1
  46. ;----------------------------
  47.         add  ecx,[size_x]
  48.         mov  eax,[ecx]
  49.        
  50.         call .clear_RGB
  51.         mov edx,128 ;100
  52.         sub edx,[next_pixel_x]
  53.         call  .mix_RGB
  54.        
  55.         mov  edx,[next_pixel_x]
  56.         mov  eax,[ecx+3]
  57.         call  .mix_RGB
  58.        
  59.         call  .RGB_to_EAX
  60.        
  61.         call .clear_RGB
  62.         mov  edx,[next_pixel_y]
  63.         call  .mix_RGB
  64. ;----------------------------  
  65.         call  .RGB_to_EAX1
  66. ;----------------------------
  67.         mov edx,128  ;100
  68.         sub edx,[next_pixel_y]
  69.         call  .mix_RGB
  70.         call  .RGB_to_EAX
  71. .24_1:
  72.         ret
  73. ;---------------------------------------------------------------------
  74. align 4
  75. .last_y_24:
  76.         mov  ebx,[temp_x1]
  77.         push eax
  78.         mov  eax,[x]
  79.         dec  eax
  80.         lea  eax,[eax*3]
  81.         cmp  ebx,eax
  82.         pop  eax
  83.         jae   .last_x_y_24 ;.24_1
  84.        
  85.         mov  ebx,[esp+4]
  86. ;       test ebx,ebx
  87. ;       jz   .24_1
  88.         inc  ebx
  89.         cmp  bx,[new_size.x1]
  90.         jae   .last_x_y_24 ;.24_1
  91. ;----------------------------  
  92.         call .clear_RGB
  93.         mov edx,128 ;100
  94.         sub edx,[next_pixel_x]
  95.         call  .mix_RGB
  96.        
  97.         mov  edx,[next_pixel_x]
  98.         mov  eax,[ecx+3]
  99.         call  .mix_RGB
  100. ;----------------------------  
  101.         call  .copy_RGB_to_RGB1
  102. ;----------------------------
  103.         mov  eax,[background_color]
  104.        
  105.         call .clear_RGB
  106.         mov edx,128 ;100
  107.         sub edx,[next_pixel_x]
  108.         call  .mix_RGB
  109.        
  110.         mov  edx,[next_pixel_x]
  111.         mov  eax,[background_color]
  112.         call  .mix_RGB
  113.        
  114.         call  .RGB_to_EAX
  115.        
  116.         call .clear_RGB
  117.         mov  edx,[next_pixel_y]
  118.         call  .mix_RGB
  119. ;----------------------------  
  120.         call  .RGB_to_EAX1
  121. ;----------------------------
  122.         mov edx,128  ;100
  123.         sub edx,[next_pixel_y]
  124.         call  .mix_RGB
  125.         call  .RGB_to_EAX
  126. ;---------------------------------------
  127.         ret
  128. ;---------------------------------------------------------------------
  129. align 4
  130. .last_x_24:
  131.         mov  ebx,[temp_y1]
  132.         inc  ebx
  133.         cmp  ebx,[y]
  134.         jae   .last_x_y_24 ;.24_1
  135.        
  136.         mov  ebx,[esp+8]
  137. ;       test ebx,ebx
  138. ;       jz   .24_1
  139.         inc  ebx
  140.         cmp  bx,[new_size.y1]
  141.         jae   .last_x_y_24 ;.24_1
  142. ;----------------------------  
  143.         call .clear_RGB
  144.         mov edx,128 ;100
  145.         sub edx,[next_pixel_x]
  146.         call  .mix_RGB
  147.        
  148.         mov  edx,[next_pixel_x]
  149.         mov  eax,[background_color]
  150.         call  .mix_RGB
  151. ;----------------------------  
  152.         call  .copy_RGB_to_RGB1
  153. ;----------------------------
  154.         add  ecx,[size_x]
  155.         mov  eax,[ecx]
  156.        
  157.         call .clear_RGB
  158.         mov edx,128 ;100
  159.         sub edx,[next_pixel_x]
  160.         call  .mix_RGB
  161.        
  162.         mov  edx,[next_pixel_x]
  163.         mov  eax,[background_color]
  164.         call  .mix_RGB
  165.        
  166.         call  .RGB_to_EAX
  167.        
  168.         call .clear_RGB
  169.         mov  edx,[next_pixel_y]
  170.         call  .mix_RGB
  171. ;----------------------------  
  172.         call  .RGB_to_EAX1
  173. ;----------------------------
  174.         mov edx,128  ;100
  175.         sub edx,[next_pixel_y]
  176.         call  .mix_RGB
  177.         call  .RGB_to_EAX
  178.         ret
  179. ;---------------------------------------------------------------------
  180. align 4
  181. .last_x_y_24:
  182. ;----------------------------  
  183.         call .clear_RGB
  184.         mov edx,128 ;100
  185.         sub edx,[next_pixel_x]
  186.         call  .mix_RGB
  187.        
  188.         mov  edx,[next_pixel_x]
  189.         mov  eax,[background_color]
  190.         call  .mix_RGB
  191. ;----------------------------  
  192.         call  .copy_RGB_to_RGB1
  193. ;----------------------------
  194.         mov  eax,[background_color]
  195.        
  196.         call .clear_RGB
  197.         mov edx,128 ;100
  198.         sub edx,[next_pixel_x]
  199.         call  .mix_RGB
  200.        
  201.         mov  edx,[next_pixel_x]
  202.         mov  eax,[background_color]
  203.         call  .mix_RGB
  204.        
  205.         call  .RGB_to_EAX
  206.        
  207.         call .clear_RGB
  208.         mov  edx,[next_pixel_y]
  209.         call  .mix_RGB
  210. ;----------------------------  
  211.         call  .RGB_to_EAX1
  212. ;----------------------------
  213.         mov edx,128  ;100
  214.         sub edx,[next_pixel_y]
  215.         call  .mix_RGB
  216.         call  .RGB_to_EAX
  217.         ret
  218. ;---------------------------------------------------------------------
  219. align 4
  220. .copy_RGB_to_RGB1:
  221.         mov  eax,[B_sample]
  222.         mov [B_sample_1],eax
  223.         mov  eax,[G_sample]
  224.         mov [G_sample_1],eax
  225.         mov  eax,[R_sample]
  226.         mov [R_sample_1],eax
  227.         ret
  228. ;---------------------------------------
  229. align 4
  230. .mix_RGB:
  231.         xor ebx,ebx
  232.         mov bl,al
  233.         imul ebx,edx
  234.         add [B_sample],ebx
  235.         shr eax,8
  236.         xor ebx,ebx
  237.         mov bl,al
  238.         imul ebx,edx
  239.         add [G_sample],ebx
  240.         shr eax,8
  241.         xor ebx,ebx
  242.         mov bl,al
  243.         imul ebx,edx
  244.         add [R_sample],ebx
  245.         ret
  246. ;---------------------------------------
  247. align 4
  248. .mix_RGB_16:
  249.         xor ebx,ebx
  250.         mov bl,al
  251.         and bl,0x1F
  252.         imul ebx,edx
  253.         add [B_sample],ebx
  254.         shr eax,5
  255.         xor ebx,ebx
  256.         mov bl,al
  257.         cmp [resolution],16
  258.         jne @f
  259.         and bl,0x3F
  260.         shr eax,6
  261.         jmp  .mix_RGB_16_G_sample
  262. align 4
  263. @@:
  264.         and bl,0x1F
  265.         shr eax,5
  266. align 4
  267. .mix_RGB_16_G_sample:
  268.         imul ebx,edx
  269.         add [G_sample],ebx
  270.         xor ebx,ebx
  271.         mov bl,al
  272.         and bl,0x1F
  273.         imul ebx,edx
  274.         add [R_sample],ebx
  275.         ret
  276. ;---------------------------------------
  277. align 4
  278. .clear_RGB:
  279.         xor ebx,ebx
  280.         mov [B_sample],ebx
  281.         mov [G_sample],ebx
  282.         mov [R_sample],ebx
  283.         ret
  284. ;---------------------------------------
  285. align 4
  286. .RGB_to_EAX:
  287.         mov eax,[R_sample]
  288.         shr eax,7      
  289.         and eax,0xff
  290.         shl eax,8
  291.         mov ebx,[G_sample]
  292.         shr ebx,7
  293.         mov al,bl
  294.         shl eax,8
  295.         mov ebx,[B_sample]
  296.         shr ebx,7
  297.         mov al,bl      
  298.         ret
  299. ;---------------------------------------
  300. align 4
  301. .RGB_to_EAX_16:
  302.         mov eax,[R_sample]
  303.         shr eax,7      
  304.         and eax,0x1F
  305.         mov ebx,[G_sample]
  306.         shr ebx,7
  307.         cmp [resolution],16
  308.         jne @f
  309.         shl eax,6
  310.         and ebx,0x3F
  311.         jmp .RGB_to_EAX_16_G_sample
  312. align 4
  313. @@:
  314.         shl eax,5
  315.         and ebx,0x1F
  316. align 4
  317. .RGB_to_EAX_16_G_sample:
  318.         add eax,ebx
  319.         shl eax,5
  320.         mov ebx,[B_sample]
  321.         shr ebx,7
  322.         and ebx,0x1F
  323.         add eax,ebx    
  324.         ret
  325. ;---------------------------------------
  326. align 4
  327. .RGB_to_EAX1:
  328.         mov eax,[R_sample_1]
  329.         shr eax,7      
  330.         and eax,0xff
  331.         shl eax,8
  332.         mov ebx,[G_sample_1]
  333.         shr ebx,7
  334.         mov al,bl
  335.         shl eax,8
  336.         mov ebx,[B_sample_1]
  337.         shr ebx,7
  338.         mov al,bl      
  339.         ret
  340. ;---------------------------------------
  341. align 4
  342. .RGB_to_EAX1_16:
  343.         mov eax,[R_sample_1]
  344.         shr eax,7      
  345.         and eax,0x1F
  346.         mov ebx,[G_sample_1]
  347.         shr ebx,7
  348.         cmp [resolution],16
  349.         jne @f
  350.         shl eax,6
  351.         and ebx,0x3F
  352.         jmp .RGB_to_EAX1_16_G_sample
  353. align 4
  354. @@:
  355.         shl eax,5
  356.         and ebx,0x1F
  357. align 4
  358. .RGB_to_EAX1_16_G_sample:
  359.         add eax,ebx
  360.         shl eax,5
  361.         mov ebx,[B_sample_1]
  362.         shr ebx,7
  363.         and ebx,0x1F
  364.         add eax,ebx    
  365.         ret
  366. ;---------------------------------------------------------------------
  367. align 4        
  368. .check_filtering_32:
  369.         cmp  [filtering],0
  370.         je   .32_1
  371.        
  372.         mov  ebx,[temp_y1]
  373.         inc  ebx
  374.         cmp  ebx,[y]
  375.         jae   .last_y_32  ;.24_1
  376.        
  377.         mov  ebx,[temp_x1]
  378.         push eax
  379.         mov  eax,[x]
  380.         dec  eax
  381.         shl  eax,2
  382.         cmp  ebx,eax
  383.         pop  eax
  384.         jae   .last_x_32 ;.24_1
  385.  
  386. ;----------------------------  
  387.         call .clear_RGB
  388.         mov edx,128 ;100
  389.         sub edx,[next_pixel_x]
  390.         call  .mix_RGB
  391.        
  392.         mov  edx,[next_pixel_x]
  393.         mov  eax,[ecx+4]
  394.         call  .mix_RGB
  395. ;----------------------------  
  396.         call  .copy_RGB_to_RGB1
  397. ;----------------------------
  398.         add  ecx,[size_x]
  399.         mov  eax,[ecx]
  400.        
  401.         call .clear_RGB
  402.         mov edx,128 ;100
  403.         sub edx,[next_pixel_x]
  404.         call  .mix_RGB
  405.        
  406.         mov  edx,[next_pixel_x]
  407.         mov  eax,[ecx+4]
  408.         call  .mix_RGB
  409.        
  410.         call  .RGB_to_EAX
  411.        
  412.         call .clear_RGB
  413.         mov  edx,[next_pixel_y]
  414.         call  .mix_RGB
  415. ;----------------------------  
  416.         call  .RGB_to_EAX1
  417. ;----------------------------
  418.         mov edx,128  ;100
  419.         sub edx,[next_pixel_y]
  420.         call  .mix_RGB
  421.         call  .RGB_to_EAX
  422. .32_1:
  423.         ret
  424. ;---------------------------------------------------------------------
  425. align 4
  426. .last_y_32:
  427.         mov  ebx,[temp_x1]
  428.         push eax
  429.         mov  eax,[x]
  430.         dec  eax
  431.         shl  eax,2
  432.         cmp  ebx,eax
  433.         pop  eax
  434.         jae   .last_x_y_32 ;.32_1
  435.        
  436.         mov  ebx,[esp+4]
  437. ;       test ebx,ebx
  438. ;       jz   .24_1
  439.         inc  ebx
  440.         cmp  bx,[new_size.x1]
  441.         jae   .last_x_y_32 ;.32_1
  442. ;----------------------------  
  443.         call .clear_RGB
  444.         mov edx,128 ;100
  445.         sub edx,[next_pixel_x]
  446.         call  .mix_RGB
  447.        
  448.         mov  edx,[next_pixel_x]
  449.         mov  eax,[ecx+4]
  450.         call  .mix_RGB
  451. ;----------------------------  
  452.         call  .copy_RGB_to_RGB1
  453. ;----------------------------
  454.         mov  eax,[background_color]
  455.        
  456.         call .clear_RGB
  457.         mov edx,128 ;100
  458.         sub edx,[next_pixel_x]
  459.         call  .mix_RGB
  460.        
  461.         mov  edx,[next_pixel_x]
  462.         mov  eax,[background_color]
  463.         call  .mix_RGB
  464.        
  465.         call  .RGB_to_EAX
  466.        
  467.         call .clear_RGB
  468.         mov  edx,[next_pixel_y]
  469.         call  .mix_RGB
  470. ;----------------------------  
  471.         call  .RGB_to_EAX1
  472. ;----------------------------
  473.         mov edx,128  ;100
  474.         sub edx,[next_pixel_y]
  475.         call  .mix_RGB
  476.         call  .RGB_to_EAX
  477.         ret
  478. ;---------------------------------------------------------------------
  479. align 4
  480. .last_x_32:
  481.         mov  ebx,[temp_y1]
  482.         inc  ebx
  483.         cmp  ebx,[y]
  484.         jae   .last_x_y_32 ;.32_1
  485.        
  486.         mov  ebx,[esp+8]
  487. ;       test ebx,ebx
  488. ;       jz   .24_1
  489.         inc  ebx
  490.         cmp  bx,[new_size.y1]
  491.         jae   .last_x_y_32 ;.32_1
  492. ;----------------------------  
  493.         call .clear_RGB
  494.         mov edx,128 ;100
  495.         sub edx,[next_pixel_x]
  496.         call  .mix_RGB
  497.        
  498.         mov  edx,[next_pixel_x]
  499.         mov  eax,[background_color]
  500.         call  .mix_RGB
  501. ;----------------------------  
  502.         call  .copy_RGB_to_RGB1
  503. ;----------------------------
  504.         add  ecx,[size_x]
  505.         mov  eax,[ecx]
  506.        
  507.         call .clear_RGB
  508.         mov edx,128 ;100
  509.         sub edx,[next_pixel_x]
  510.         call  .mix_RGB
  511.        
  512.         mov  edx,[next_pixel_x]
  513.         mov  eax,[background_color]
  514.         call  .mix_RGB
  515.        
  516.         call  .RGB_to_EAX
  517.        
  518.         call .clear_RGB
  519.         mov  edx,[next_pixel_y]
  520.         call  .mix_RGB
  521. ;----------------------------  
  522.         call  .RGB_to_EAX1
  523. ;----------------------------
  524.         mov edx,128  ;100
  525.         sub edx,[next_pixel_y]
  526.         call  .mix_RGB
  527.         call  .RGB_to_EAX
  528.         ret
  529. ;---------------------------------------------------------------------
  530. align 4
  531. .last_x_y_32:
  532. ;----------------------------  
  533.         call .clear_RGB
  534.         mov edx,128 ;100
  535.         sub edx,[next_pixel_x]
  536.         call  .mix_RGB
  537.        
  538.         mov  edx,[next_pixel_x]
  539.         mov  eax,[background_color]
  540.         call  .mix_RGB
  541. ;----------------------------  
  542.         call  .copy_RGB_to_RGB1
  543. ;----------------------------
  544.         mov  eax,[background_color]
  545.        
  546.         call .clear_RGB
  547.         mov edx,128 ;100
  548.         sub edx,[next_pixel_x]
  549.         call  .mix_RGB
  550.        
  551.         mov  edx,[next_pixel_x]
  552.         mov  eax,[background_color]
  553.         call  .mix_RGB
  554.        
  555.         call  .RGB_to_EAX
  556.        
  557.         call .clear_RGB
  558.         mov  edx,[next_pixel_y]
  559.         call  .mix_RGB
  560. ;----------------------------  
  561.         call  .RGB_to_EAX1
  562. ;----------------------------
  563.         mov edx,128  ;100
  564.         sub edx,[next_pixel_y]
  565.         call  .mix_RGB
  566.         call  .RGB_to_EAX
  567.         ret
  568. ;---------------------------------------------------------------------
  569. align 4        
  570. .check_filtering_16:
  571.         cmp  [filtering],0
  572.         je   .16_1
  573.        
  574.         mov  ebx,[temp_y1]
  575.         inc  ebx
  576.         cmp  ebx,[y]
  577.         jae   .last_y_16  ;.24_1
  578.        
  579.         mov  ebx,[temp_x1]
  580.         push eax
  581.         mov  eax,[x]
  582.         dec  eax
  583.         shl  eax,1
  584.         cmp  ebx,eax
  585.         pop  eax
  586.         jae   .last_x_16 ;.24_1
  587.  
  588. ;----------------------------  
  589.         call .clear_RGB
  590.         mov edx,128 ;100
  591.         sub edx,[next_pixel_x]
  592.         call  .mix_RGB_16
  593.        
  594.         mov  edx,[next_pixel_x]
  595.         xor  eax,eax
  596.         mov  ax,[ecx+2]
  597.         call  .mix_RGB_16
  598. ;----------------------------  
  599.         call  .copy_RGB_to_RGB1
  600. ;----------------------------
  601.         add  ecx,[size_x]
  602.         xor  eax,eax
  603.         mov  ax,[ecx]
  604.        
  605.         call .clear_RGB
  606.         mov edx,128 ;100
  607.         sub edx,[next_pixel_x]
  608.         call  .mix_RGB_16
  609.        
  610.         mov  edx,[next_pixel_x]
  611.         xor  eax,eax
  612.         mov  ax,[ecx+2]
  613.         call  .mix_RGB_16
  614.        
  615.         call  .RGB_to_EAX_16
  616.        
  617.         call .clear_RGB
  618.         mov  edx,[next_pixel_y]
  619.         call  .mix_RGB_16
  620. ;----------------------------  
  621.         call  .RGB_to_EAX1_16
  622. ;----------------------------
  623.         mov edx,128  ;100
  624.         sub edx,[next_pixel_y]
  625.         call  .mix_RGB_16
  626.         call  .RGB_to_EAX_16
  627. .16_1:
  628.         ret
  629. ;---------------------------------------------------------------------
  630. align 4
  631. .last_y_16:
  632.         mov  ebx,[temp_x1]
  633.         push eax
  634.         mov  eax,[x]
  635.         dec  eax
  636.         shl  eax,1
  637.         cmp  ebx,eax
  638.         pop  eax
  639.         jae   .last_x_y_16 ;.16_1
  640.        
  641.         mov  ebx,[esp+4]
  642. ;       test ebx,ebx
  643. ;       jz   .24_1
  644.         inc  ebx
  645.         cmp  bx,[new_size.x1]
  646.         jae   .last_x_y_16 ;.16_1
  647. ;----------------------------  
  648.         call .clear_RGB
  649.         mov edx,128 ;100
  650.         sub edx,[next_pixel_x]
  651.         call  .mix_RGB_16
  652.        
  653.         mov  edx,[next_pixel_x]
  654.         xor  eax,eax
  655.         mov  ax,[ecx+2]
  656.         call  .mix_RGB_16
  657. ;----------------------------  
  658.         call  .copy_RGB_to_RGB1
  659. ;----------------------------
  660.         mov  eax,[background_color]
  661.         and  eax,0xffff
  662.        
  663.         call .clear_RGB
  664.         mov edx,128 ;100
  665.         sub edx,[next_pixel_x]
  666.         call  .mix_RGB_16
  667.        
  668.         mov  edx,[next_pixel_x]
  669.         mov  eax,[background_color]
  670.         and  eax,0xffff
  671.         call  .mix_RGB_16
  672.        
  673.         call  .RGB_to_EAX_16
  674.        
  675.         call .clear_RGB
  676.         mov  edx,[next_pixel_y]
  677.         call  .mix_RGB_16
  678. ;----------------------------  
  679.         call  .RGB_to_EAX1_16
  680. ;----------------------------
  681.         mov edx,128  ;100
  682.         sub edx,[next_pixel_y]
  683.         call  .mix_RGB_16
  684.         call  .RGB_to_EAX_16
  685.         ret
  686. ;---------------------------------------------------------------------
  687. align 4
  688. .last_x_16:
  689.         mov  ebx,[temp_y1]
  690.         inc  ebx
  691.         cmp  ebx,[y]
  692.         jae   .last_x_y_16 ;.16_1
  693.        
  694.         mov  ebx,[esp+8]
  695. ;       test ebx,ebx
  696. ;       jz   .24_1
  697.         inc  ebx
  698.         cmp  bx,[new_size.y1]
  699.         jae   .last_x_y_16 ;.16_1
  700. ;----------------------------  
  701.         call .clear_RGB
  702.         mov edx,128 ;100
  703.         sub edx,[next_pixel_x]
  704.         call  .mix_RGB_16
  705.        
  706.         mov  edx,[next_pixel_x]
  707.         mov  eax,[background_color]
  708.         and  eax,0xffff
  709.         call  .mix_RGB_16
  710. ;----------------------------  
  711.         call  .copy_RGB_to_RGB1
  712. ;----------------------------
  713.         add  ecx,[size_x]
  714.         xor  eax,eax
  715.         mov  ax,[ecx]
  716.        
  717.         call .clear_RGB
  718.         mov edx,128 ;100
  719.         sub edx,[next_pixel_x]
  720.         call  .mix_RGB_16
  721.        
  722.         mov  edx,[next_pixel_x]
  723.         mov  eax,[background_color]
  724.         and  eax,0xffff
  725.         call  .mix_RGB_16
  726.        
  727.         call  .RGB_to_EAX_16
  728.        
  729.         call .clear_RGB
  730.         mov  edx,[next_pixel_y]
  731.         call  .mix_RGB_16
  732. ;----------------------------  
  733.         call  .RGB_to_EAX1_16
  734. ;----------------------------
  735.         mov edx,128  ;100
  736.         sub edx,[next_pixel_y]
  737.         call  .mix_RGB_16
  738.         call  .RGB_to_EAX_16
  739.         ret
  740. ;---------------------------------------------------------------------
  741. align 4
  742. .last_x_y_16:
  743. ;----------------------------  
  744.         call .clear_RGB
  745.         mov edx,128 ;100
  746.         sub edx,[next_pixel_x]
  747.         call  .mix_RGB_16
  748.        
  749.         mov  edx,[next_pixel_x]
  750.         mov  eax,[background_color]
  751.         and  eax,0xffff
  752.         call  .mix_RGB_16
  753. ;----------------------------  
  754.         call  .copy_RGB_to_RGB1
  755. ;----------------------------
  756.         mov  eax,[background_color]
  757.         and  eax,0xffff
  758.        
  759.         call .clear_RGB
  760.         mov edx,128 ;100
  761.         sub edx,[next_pixel_x]
  762.         call  .mix_RGB_16
  763.        
  764.         mov  edx,[next_pixel_x]
  765.         mov  eax,[background_color]
  766.         and  eax,0xffff
  767.         call  .mix_RGB_16
  768.        
  769.         call  .RGB_to_EAX_16
  770.        
  771.         call .clear_RGB
  772.         mov  edx,[next_pixel_y]
  773.         call  .mix_RGB_16
  774. ;----------------------------  
  775.         call  .RGB_to_EAX1_16
  776. ;----------------------------
  777.         mov edx,128  ;100
  778.         sub edx,[next_pixel_y]
  779.         call  .mix_RGB_16
  780.         call  .RGB_to_EAX_16
  781.         ret
  782. ;---------------------------------------------------------------------
  783. align 4
  784. .get_palette:
  785.         shl  eax,2
  786.         add  eax,[palette]
  787.         mov  eax,[eax]
  788.         ret
  789. ;---------------------------------------------------------------------
  790. align 4
  791. .check_filtering_8:
  792.         xor  eax,eax
  793.         mov  al,[ecx]
  794.         call .get_palette
  795.        
  796.         mov  ebx,[temp_y1]
  797.         inc  ebx
  798.         cmp  ebx,[y]
  799.         jae   .last_y_8
  800.        
  801.         mov  ebx,[temp_x1]
  802.         push eax
  803.         mov  eax,[x]
  804.         dec  eax
  805.         cmp  ebx,eax
  806.         pop  eax
  807.         jae   .last_x_8
  808.  
  809. ;----------------------------  
  810.         call .clear_RGB
  811.         mov edx,128 ;100
  812.         sub edx,[next_pixel_x]
  813.         call  .mix_RGB
  814.        
  815.         mov  edx,[next_pixel_x]
  816.         xor  eax,eax
  817.         mov  al,[ecx+1]
  818.         call .get_palette
  819.         call  .mix_RGB
  820. ;----------------------------  
  821.         call  .copy_RGB_to_RGB1
  822. ;----------------------------
  823.         add  ecx,[size_x]
  824.         xor  eax,eax
  825.         mov  al,[ecx]
  826.         call .get_palette
  827.         call .clear_RGB
  828.         mov edx,128 ;100
  829.         sub edx,[next_pixel_x]
  830.         call  .mix_RGB
  831.        
  832.         mov  edx,[next_pixel_x]
  833.         xor  eax,eax
  834.         mov  al,[ecx+1]
  835.         call .get_palette
  836.         call  .mix_RGB
  837.        
  838.         call  .RGB_to_EAX
  839.        
  840.         call .clear_RGB
  841.         mov  edx,[next_pixel_y]
  842.         call  .mix_RGB
  843. ;----------------------------  
  844.         call  .RGB_to_EAX1
  845. ;----------------------------
  846.         mov edx,128  ;100
  847.         sub edx,[next_pixel_y]
  848.         call  .mix_RGB
  849.         call  .RGB_to_EAX
  850. .8_1:
  851.         ret
  852. ;---------------------------------------------------------------------
  853. align 4
  854. .last_y_8:
  855.         mov  ebx,[temp_x1]
  856.         push eax
  857.         mov  eax,[x]
  858.         dec  eax
  859.         cmp  ebx,eax
  860.         pop  eax
  861.         jae   .last_x_y_8 ;.8_1
  862.        
  863.         mov  ebx,[esp+4]
  864. ;       test ebx,ebx
  865. ;       jz   .24_1
  866.         inc  ebx
  867.         cmp  bx,[new_size.x1]
  868.         jae   .last_x_y_8 ;.8_1
  869. ;----------------------------  
  870.         call .clear_RGB
  871.         mov edx,128 ;100
  872.         sub edx,[next_pixel_x]
  873.         call  .mix_RGB
  874.        
  875.         mov  edx,[next_pixel_x]
  876.         xor  eax,eax
  877.         mov  al,[ecx+1]
  878.         call .get_palette
  879.         call  .mix_RGB
  880. ;----------------------------  
  881.         call  .copy_RGB_to_RGB1
  882. ;----------------------------
  883.         mov  eax,[background_color]
  884.         call .clear_RGB
  885.         mov edx,128 ;100
  886.         sub edx,[next_pixel_x]
  887.         call  .mix_RGB
  888.        
  889.         mov  edx,[next_pixel_x]
  890.         mov  eax,[background_color]
  891.         call  .mix_RGB
  892.        
  893.         call  .RGB_to_EAX
  894.        
  895.         call .clear_RGB
  896.         mov  edx,[next_pixel_y]
  897.         call  .mix_RGB
  898. ;----------------------------  
  899.         call  .RGB_to_EAX1
  900. ;----------------------------
  901.         mov edx,128  ;100
  902.         sub edx,[next_pixel_y]
  903.         call  .mix_RGB
  904.         call  .RGB_to_EAX
  905. ;---------------------------------------
  906.         ret
  907. ;---------------------------------------------------------------------
  908. align 4
  909. .last_x_8:
  910.         mov  ebx,[temp_y1]
  911.         inc  ebx
  912.         cmp  ebx,[y]
  913.         jae   .last_x_y_8 ;.8_1
  914.        
  915.         mov  ebx,[esp+8]
  916. ;       test ebx,ebx
  917. ;       jz   .24_1
  918.         inc  ebx
  919.         cmp  bx,[new_size.y1]
  920.         jae   .last_x_y_8 ;.8_1
  921. ;----------------------------  
  922.         call .clear_RGB
  923.         mov edx,128 ;100
  924.         sub edx,[next_pixel_x]
  925.         call  .mix_RGB
  926.        
  927.         mov  edx,[next_pixel_x]
  928.         mov  eax,[background_color]
  929.         call  .mix_RGB
  930. ;----------------------------  
  931.         call  .copy_RGB_to_RGB1
  932. ;----------------------------
  933.         add  ecx,[size_x]
  934.         xor  eax,eax
  935.         mov  al,[ecx]
  936.         call .get_palette
  937.        
  938.         call .clear_RGB
  939.         mov edx,128 ;100
  940.         sub edx,[next_pixel_x]
  941.         call  .mix_RGB
  942.        
  943.         mov  edx,[next_pixel_x]
  944.         mov  eax,[background_color]
  945.  
  946.         call  .mix_RGB
  947.        
  948.         call  .RGB_to_EAX
  949.        
  950.         call .clear_RGB
  951.         mov  edx,[next_pixel_y]
  952.         call  .mix_RGB
  953. ;----------------------------  
  954.         call  .RGB_to_EAX1
  955. ;----------------------------
  956.         mov edx,128  ;100
  957.         sub edx,[next_pixel_y]
  958.         call  .mix_RGB
  959.         call  .RGB_to_EAX
  960.         ret
  961. ;---------------------------------------------------------------------
  962. align 4
  963. .last_x_y_8:
  964. ;----------------------------  
  965.         call .clear_RGB
  966.         mov edx,128 ;100
  967.         sub edx,[next_pixel_x]
  968.         call  .mix_RGB
  969.        
  970.         mov  edx,[next_pixel_x]
  971.         mov  eax,[background_color]
  972.         call  .mix_RGB
  973. ;----------------------------  
  974.         call  .copy_RGB_to_RGB1
  975. ;----------------------------
  976.         mov  eax,[background_color]
  977.        
  978.         call .clear_RGB
  979.         mov edx,128 ;100
  980.         sub edx,[next_pixel_x]
  981.         call  .mix_RGB
  982.        
  983.         mov  edx,[next_pixel_x]
  984.         mov  eax,[background_color]
  985.  
  986.         call  .mix_RGB
  987.        
  988.         call  .RGB_to_EAX
  989.        
  990.         call .clear_RGB
  991.         mov  edx,[next_pixel_y]
  992.         call  .mix_RGB
  993. ;----------------------------  
  994.         call  .RGB_to_EAX1
  995. ;----------------------------
  996.         mov edx,128  ;100
  997.         sub edx,[next_pixel_y]
  998.         call  .mix_RGB
  999.         call  .RGB_to_EAX
  1000.         ret
  1001. ;---------------------------------------------------------------------