File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -15,24 +15,24 @@ module Pluto::Operation::HorizontalBlur
1515 l_index : Int32 = c_index
1616 r_index : Int32 = c_index + value
1717
18- f_value : Int32 = channel.unsafe_fetch(c_index).to_i32
19- l_value : Int32 = channel.unsafe_fetch(c_index + @width - 1 ).to_i32
18+ f_value : Int32 = channel.unsafe_fetch(c_index).to_i
19+ l_value : Int32 = channel.unsafe_fetch(c_index + @width - 1 ).to_i
2020 c_value : Int32 = (value + 1 ) * f_value
2121
2222 (0 ..value - 1 ).each do
2323 c_value += channel.unsafe_fetch(c_index)
2424 end
2525
2626 (0 ..value).each do
27- c_value += channel.unsafe_fetch(r_index).to_i32 - f_value
27+ c_value += channel.unsafe_fetch(r_index).to_i - f_value
2828 buffer.unsafe_put(c_index, (c_value * multiplier).to_u8)
2929
3030 r_index += 1
3131 c_index += 1
3232 end
3333
3434 (value + 1 ..@width - value - 1 ).each do
35- c_value += (channel.unsafe_fetch(r_index).to_i32 - channel.unsafe_fetch(l_index).to_i32 )
35+ c_value += (channel.unsafe_fetch(r_index).to_i - channel.unsafe_fetch(l_index).to_i )
3636 buffer.unsafe_put(c_index, (c_value * multiplier).to_u8)
3737
3838 r_index += 1
@@ -41,7 +41,7 @@ module Pluto::Operation::HorizontalBlur
4141 end
4242
4343 (@width - value..@width - 1 ).each do
44- c_value += l_value - channel.unsafe_fetch(l_index).to_i32
44+ c_value += l_value - channel.unsafe_fetch(l_index).to_i
4545 buffer.unsafe_put(c_index, (c_value * multiplier).to_u8)
4646
4747 l_index += 1
Original file line number Diff line number Diff line change @@ -15,24 +15,24 @@ module Pluto::Operation::VerticalBlur
1515 l_index : Int32 = c_index
1616 r_index : Int32 = c_index + value * @width
1717
18- f_value : Int32 = channel.unsafe_fetch(c_index).to_i32
19- l_value : Int32 = channel.unsafe_fetch(c_index + @width * (@height - 1 )).to_i32
18+ f_value : Int32 = channel.unsafe_fetch(c_index).to_i
19+ l_value : Int32 = channel.unsafe_fetch(c_index + @width * (@height - 1 )).to_i
2020 c_value : Int32 = (value + 1 ) * f_value
2121
2222 (0 ..value - 1 ).each do
2323 c_value += channel.unsafe_fetch(c_index)
2424 end
2525
2626 (0 ..value).each do
27- c_value += channel.unsafe_fetch(r_index).to_i32 - f_value
27+ c_value += channel.unsafe_fetch(r_index).to_i - f_value
2828 buffer.unsafe_put(c_index, (c_value * multiplier).to_u8)
2929
3030 r_index += @width
3131 c_index += @width
3232 end
3333
3434 (value + 1 ..@height - value - 1 ).each do
35- c_value += channel.unsafe_fetch(r_index).to_i32 - channel.unsafe_fetch(l_index).to_i32
35+ c_value += channel.unsafe_fetch(r_index).to_i - channel.unsafe_fetch(l_index).to_i
3636 buffer.unsafe_put(c_index, (c_value * multiplier).to_u8)
3737
3838 l_index += @width
@@ -41,7 +41,7 @@ module Pluto::Operation::VerticalBlur
4141 end
4242
4343 (@height - value..@height - 1 ).each do
44- c_value += l_value - channel.unsafe_fetch(l_index).to_i32
44+ c_value += l_value - channel.unsafe_fetch(l_index).to_i
4545 buffer.unsafe_put(c_index, (c_value * multiplier).to_u8)
4646
4747 l_index += @width
You can’t perform that action at this time.
0 commit comments