You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
Simple bilinear interpolation in assembler
2018-05-08
16:24
ws
Registered: Apr 2012
Posts: 229
Simple bilinear interpolation in assembler
Hello,
for some reason, with increasing age, i am no longer interested in spending much time on re-inventing the wheel.
Therefore, i'd like to ask if any of you wizards perhaps know of a close solution to this problem:
Lets say you have a "heatmap" in a matrix of 20x10 cells.
Does anyone perhaps already have a fast and simple routine for interpolating all the values within these cells, so that when you have some cells with very high values and some cells with very low values, that more or less smooth transitions (image blur) can be achieved in very few rasterlines?
Google just spat out hardcore math for me, which i feel unable to wrap my head around, when attempted to translate to a c64 assembler solution. (I code in assembly, directly, no c++ or the like, pretty please).
best regards
WS
... 32 posts hidden. Click
here
to view all posts....
2018-06-09
17:19
Sparta
Registered: Feb 2017
Posts: 39
If speed is not an issue, you may also want to try something like this to get an even better average of 4 neighboring values:
lda buffer1-1 adc buffer1+1 ror sta ZP lda buffer-$28 adc buffer+$28 ror adc ZP ror sta buffer2
2018-06-09
17:47
ws
Registered: Apr 2012
Posts: 229
Oh man! This is so beautiful! Thank you!!!
http://dl.dataelephant.net/spartablur.prg
(press space to move)
http://dl.dataelephant.net/spartablur.rar
(requires cbmprgstudio to compile:
http:
http://www.ajordison.co.uk/download.html
)
Previous
-
1
|
2
|
3
|
4
| 5 - Next
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
CSDb V2 development
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
Guests online: 91
Top Demos
1
Next Level
(9.8)
2
Mojo
(9.7)
3
Coma Light 13
(9.7)
4
Edge of Disgrace
(9.6)
5
Comaland 100%
(9.6)
6
No Bounds
(9.6)
7
Uncensored
(9.6)
8
Wonderland XIV
(9.6)
9
Memento Mori
(9.6)
10
Bromance
(9.5)
Top onefile Demos
1
It's More Fun to Com..
(9.7)
2
Party Elk 2
(9.7)
3
Cubic Dream
(9.6)
4
Copper Booze
(9.5)
5
TRSAC, Gabber & Pebe..
(9.5)
6
Rainbow Connection
(9.5)
7
Dawnfall V1.1
(9.5)
8
Quadrants
(9.5)
9
Daah, Those Acid Pil..
(9.5)
10
Birth of a Flower
(9.5)
Top Groups
1
Nostalgia
(9.3)
2
Oxyron
(9.3)
3
Booze Design
(9.3)
4
Censor Design
(9.3)
5
Crest
(9.3)
Top Musicians
1
Vincenzo
(9.8)
2
Rob Hubbard
(9.7)
3
Stinsen
(9.7)
4
Jeroen Tel
(9.6)
5
Linus
(9.6)
Home
-
Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.053 sec.