BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: BT81x and Animation support  (Read 13395 times)

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
BT81x and Animation support
« on: August 02, 2019, 05:19:31 PM »

I played with the new animation support in the EVE Screen Editor.
And I wonder what this is supposed to be used for.

Splitting up the frames of an animation into tiles is nice to save space in the external FLASH I guess.
Although the converter doubles the amount of frames and all the odd frames look exactly the same than
the even ones, so I have to wonder if this really is saving memory.
Without more insight I call this a bug in the converter.

There is a huge issue however, due to the tiling of the frames the display list is getting filled rather fast.
Now the smallest off-the-shelve FLASH on a BT81x module is 32MBit and I can easily replace it.
But the size of the display list is still only 8kB or 2048 commands.
The 124x300 pixel animation I have up in the EVE Screen Editor fills up the RAM_DL to 28% with only four lines
of coprocessor commands.

Am I missing something important here?
Right now this looks like a feature I rather not use.
Just cyling thru images on my controller has zero impact on the display list and while this costs a couple
more lines of code I just got a lot of free space for moving the images into the external FLASH.

And I checked, there is no way to tell the animation converter to drop the tiling.
Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: BT81x and Animation support
« Reply #1 on: September 10, 2019, 04:44:44 AM »

For no tiling option, it is better not to use animation converter. 
Instead, use the flash file generation to store the images consecutively frame by frame.

Like this:

"
Unified.blob
frame0.astc
frame1.astc
.......
framen.astc
"

In the display list,  change the bitmap source to display different frame from time to time.   It works well to me although it may take more spaces. 

Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: BT81x and Animation support
« Reply #2 on: September 10, 2019, 04:53:03 PM »

Yes, this is kind of what I wrote already.
Depending on the size of the image I would prefer using a single image though and make use of CELL().

The point however was specifically the new animation functionality.
And right now It looks to me like a pointless way to waste precious space in the display-list.

I kind of hope that I am wrong with this and that I am missing something.
But to find out someone from Bridgetek would need to elaborate and what benefits this functionality has.
Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: BT81x and Animation support
« Reply #3 on: September 12, 2019, 09:46:42 AM »

From my opinion, that is a trade-off between the display list (RAM_DL utilization) and flash space. 
Compared to flash space, the RAM_DL can be reused across all the frames.
For instance, the GIF I enclosed here, is in 480x176 and converted into ASTC8x8 based animation object, which takes only 23K bytes flash space
for 8 frames, due to the common tile optimization.    However, saving those 8 frames in ASTC8x8 will take 260Kbytes flash space.
We can see in this use case,  with around 400 display list overhead,  flash space is saved around 220 Kbytes.
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: BT81x and Animation support
« Reply #4 on: September 12, 2019, 05:52:57 PM »

What version of the EVE Asset Builder are you even using?
The 1.0 does not show this information, it stops at "Number of frames".

So okay, what you are saying is that Animations might be a vital option when you have enough space in the display
list but need to preserve space in the flash.
After I tried animations in the EVE Screen Editor again I have to agree that this looks like a good observation.

I am still getting twice the frames for the animation.data than the animation actually has.
With "CMD_ANIMFRAME(350, 230, 18048, 0)" the even and odd frames are the same.

What has me worried is what a single CMD_ANIMFRAME translates to in the display-list.

My 400x300 sized animation frame is split into 16x16 pixel tiles, okay.
And because many of the tiles look the same the compression ratio is quite high and the display list
is on the shorter end since it requires not so many BITMAP_SOURCE commands.

Okay, so the high compression compared to single frames might only work with very simple animations.
And more complex animations will require even more space in the display list.

Code: [Select]
Raw Text
0 0x22000000 SAVE_CONTEXT()
1 0x0500000f BITMAP_HANDLE(15)
2 0x2c000e60 VERTEX_TRANSLATE_Y(3680)
3 0x2b0015e0 VERTEX_TRANSLATE_X(5600)
4 0x08002020 BITMAP_SIZE(NEAREST, BORDER, BORDER, 16, 32)
5 0x29000000 BITMAP_SIZE_H(0, 0)
6 0x07f84004 BITMAP_LAYOUT(GLFORMAT, 32, 4)
7 0x28000000 BITMAP_LAYOUT_H(0, 0)
8 0x2e0093b7 BITMAP_EXT_FORMAT(COMPRESSED_RGBA_ASTC_8x8_KHR)
9 0x2f0004e5 BITMAP_SWIZZLE(RED, GREEN, BLUE, ALPHA)
10 0x0b00000c BLEND_FUNC(ONE, ONE_MINUS_SRC_ALPHA)
11 0x1f000001 BEGIN(BITMAPS)
12 0x01800080 BITMAP_SOURCE(0x800000 | 128)
13 0x79c07600 VERTEX2F(-3200, -2560)
14 0x7a407600 VERTEX2F(-2944, -2560)
15 0x7ac07600 VERTEX2F(-2688, -2560)
16 0x7b407600 VERTEX2F(-2432, -2560)
17 0x7bc07600 VERTEX2F(-2176, -2560)
18 0x7c407600 VERTEX2F(-1920, -2560)
19 0x7cc07600 VERTEX2F(-1664, -2560)
20 0x7d407600 VERTEX2F(-1408, -2560)
21 0x7dc07600 VERTEX2F(-1152, -2560)
22 0x7e407600 VERTEX2F(-896, -2560)
23 0x7ec07600 VERTEX2F(-640, -2560)
24 0x7f407600 VERTEX2F(-384, -2560)
25 0x7fc07600 VERTEX2F(-128, -2560)
26 0x40407600 VERTEX2F(128, -2560)
27 0x40c07600 VERTEX2F(384, -2560)
28 0x41407600 VERTEX2F(640, -2560)
29 0x41c07600 VERTEX2F(896, -2560)
30 0x42407600 VERTEX2F(1152, -2560)
31 0x42c07600 VERTEX2F(1408, -2560)
32 0x43407600 VERTEX2F(1664, -2560)
33 0x43c07600 VERTEX2F(1920, -2560)
34 0x44407600 VERTEX2F(2176, -2560)
35 0x44c07600 VERTEX2F(2432, -2560)
36 0x45407600 VERTEX2F(2688, -2560)
37 0x45c07600 VERTEX2F(2944, -2560)
38 0x01800084 BITMAP_SOURCE(0x800000 | 132)
39 0x79c07800 VERTEX2F(-3200, -2048)
40 0x7a407800 VERTEX2F(-2944, -2048)
41 0x7ac07800 VERTEX2F(-2688, -2048)
42 0x7b407800 VERTEX2F(-2432, -2048)
43 0x7bc07800 VERTEX2F(-2176, -2048)
44 0x7c407800 VERTEX2F(-1920, -2048)
45 0x7cc07800 VERTEX2F(-1664, -2048)
46 0x7d407800 VERTEX2F(-1408, -2048)
47 0x7dc07800 VERTEX2F(-1152, -2048)
48 0x7e407800 VERTEX2F(-896, -2048)
49 0x7ec07800 VERTEX2F(-640, -2048)
50 0x7f407800 VERTEX2F(-384, -2048)
51 0x7fc07800 VERTEX2F(-128, -2048)
52 0x40407800 VERTEX2F(128, -2048)
53 0x40c07800 VERTEX2F(384, -2048)
54 0x41407800 VERTEX2F(640, -2048)
55 0x41c07800 VERTEX2F(896, -2048)
56 0x42407800 VERTEX2F(1152, -2048)
57 0x42c07800 VERTEX2F(1408, -2048)
58 0x43407800 VERTEX2F(1664, -2048)
59 0x43c07800 VERTEX2F(1920, -2048)
60 0x44407800 VERTEX2F(2176, -2048)
61 0x44c07800 VERTEX2F(2432, -2048)
62 0x45407800 VERTEX2F(2688, -2048)
63 0x45c07800 VERTEX2F(2944, -2048)
64 0x79c07a00 VERTEX2F(-3200, -1536)
65 0x7a407a00 VERTEX2F(-2944, -1536)
66 0x7ac07a00 VERTEX2F(-2688, -1536)
67 0x7b407a00 VERTEX2F(-2432, -1536)
68 0x7bc07a00 VERTEX2F(-2176, -1536)
69 0x7c407a00 VERTEX2F(-1920, -1536)
70 0x7cc07a00 VERTEX2F(-1664, -1536)
71 0x7d407a00 VERTEX2F(-1408, -1536)
72 0x7dc07a00 VERTEX2F(-1152, -1536)
73 0x7e407a00 VERTEX2F(-896, -1536)
74 0x7ec07a00 VERTEX2F(-640, -1536)
75 0x7f407a00 VERTEX2F(-384, -1536)
76 0x7fc07a00 VERTEX2F(-128, -1536)
77 0x40407a00 VERTEX2F(128, -1536)
78 0x40c07a00 VERTEX2F(384, -1536)
79 0x41407a00 VERTEX2F(640, -1536)
80 0x41c07a00 VERTEX2F(896, -1536)
81 0x42407a00 VERTEX2F(1152, -1536)
82 0x42c07a00 VERTEX2F(1408, -1536)
83 0x43407a00 VERTEX2F(1664, -1536)
84 0x43c07a00 VERTEX2F(1920, -1536)
85 0x44407a00 VERTEX2F(2176, -1536)
86 0x44c07a00 VERTEX2F(2432, -1536)
87 0x45407a00 VERTEX2F(2688, -1536)
88 0x45c07a00 VERTEX2F(2944, -1536)
89 0x79c07c00 VERTEX2F(-3200, -1024)
90 0x7a407c00 VERTEX2F(-2944, -1024)
91 0x7ac07c00 VERTEX2F(-2688, -1024)
92 0x7b407c00 VERTEX2F(-2432, -1024)
93 0x7bc07c00 VERTEX2F(-2176, -1024)
94 0x43c07c00 VERTEX2F(1920, -1024)
95 0x44407c00 VERTEX2F(2176, -1024)
96 0x44c07c00 VERTEX2F(2432, -1024)
97 0x45407c00 VERTEX2F(2688, -1024)
98 0x45c07c00 VERTEX2F(2944, -1024)
99 0x79c07e00 VERTEX2F(-3200, -512)
100 0x7a407e00 VERTEX2F(-2944, -512)
101 0x7ac07e00 VERTEX2F(-2688, -512)
102 0x7b407e00 VERTEX2F(-2432, -512)
103 0x7bc07e00 VERTEX2F(-2176, -512)
104 0x7e407e00 VERTEX2F(-896, -512)
105 0x7ec07e00 VERTEX2F(-640, -512)
106 0x7f407e00 VERTEX2F(-384, -512)
107 0x7fc07e00 VERTEX2F(-128, -512)
108 0x40407e00 VERTEX2F(128, -512)
109 0x40c07e00 VERTEX2F(384, -512)
110 0x41407e00 VERTEX2F(640, -512)
111 0x41c07e00 VERTEX2F(896, -512)
112 0x42407e00 VERTEX2F(1152, -512)
113 0x43c07e00 VERTEX2F(1920, -512)
114 0x44407e00 VERTEX2F(2176, -512)
115 0x44c07e00 VERTEX2F(2432, -512)
116 0x45407e00 VERTEX2F(2688, -512)
117 0x45c07e00 VERTEX2F(2944, -512)
118 0x79c00000 VERTEX2F(-3200, 0)
119 0x7a400000 VERTEX2F(-2944, 0)
120 0x7ac00000 VERTEX2F(-2688, 0)
121 0x7b400000 VERTEX2F(-2432, 0)
122 0x7bc00000 VERTEX2F(-2176, 0)
123 0x7e400000 VERTEX2F(-896, 0)
124 0x7ec00000 VERTEX2F(-640, 0)
125 0x7f400000 VERTEX2F(-384, 0)
126 0x7fc00000 VERTEX2F(-128, 0)
127 0x40400000 VERTEX2F(128, 0)
128 0x40c00000 VERTEX2F(384, 0)
129 0x41400000 VERTEX2F(640, 0)
130 0x41c00000 VERTEX2F(896, 0)
131 0x42400000 VERTEX2F(1152, 0)
132 0x43c00000 VERTEX2F(1920, 0)
133 0x44400000 VERTEX2F(2176, 0)
134 0x44c00000 VERTEX2F(2432, 0)
135 0x45400000 VERTEX2F(2688, 0)
136 0x45c00000 VERTEX2F(2944, 0)
137 0x79c00200 VERTEX2F(-3200, 512)
138 0x7a400200 VERTEX2F(-2944, 512)
139 0x7ac00200 VERTEX2F(-2688, 512)
140 0x7b400200 VERTEX2F(-2432, 512)
141 0x7bc00200 VERTEX2F(-2176, 512)
142 0x43c00200 VERTEX2F(1920, 512)
143 0x44400200 VERTEX2F(2176, 512)
144 0x44c00200 VERTEX2F(2432, 512)
145 0x45400200 VERTEX2F(2688, 512)
146 0x45c00200 VERTEX2F(2944, 512)
147 0x79c00400 VERTEX2F(-3200, 1024)
148 0x7a400400 VERTEX2F(-2944, 1024)
149 0x7ac00400 VERTEX2F(-2688, 1024)
150 0x7b400400 VERTEX2F(-2432, 1024)
151 0x7bc00400 VERTEX2F(-2176, 1024)
152 0x7c400400 VERTEX2F(-1920, 1024)
153 0x7cc00400 VERTEX2F(-1664, 1024)
154 0x7d400400 VERTEX2F(-1408, 1024)
155 0x7dc00400 VERTEX2F(-1152, 1024)
156 0x7e400400 VERTEX2F(-896, 1024)
157 0x7ec00400 VERTEX2F(-640, 1024)
158 0x7f400400 VERTEX2F(-384, 1024)
159 0x7fc00400 VERTEX2F(-128, 1024)
160 0x40400400 VERTEX2F(128, 1024)
161 0x40c00400 VERTEX2F(384, 1024)
162 0x41400400 VERTEX2F(640, 1024)
163 0x41c00400 VERTEX2F(896, 1024)
164 0x42400400 VERTEX2F(1152, 1024)
165 0x42c00400 VERTEX2F(1408, 1024)
166 0x43400400 VERTEX2F(1664, 1024)
167 0x43c00400 VERTEX2F(1920, 1024)
168 0x44400400 VERTEX2F(2176, 1024)
169 0x44c00400 VERTEX2F(2432, 1024)
170 0x45400400 VERTEX2F(2688, 1024)
171 0x45c00400 VERTEX2F(2944, 1024)
172 0x79c00600 VERTEX2F(-3200, 1536)
173 0x7a400600 VERTEX2F(-2944, 1536)
174 0x7ac00600 VERTEX2F(-2688, 1536)
175 0x7b400600 VERTEX2F(-2432, 1536)
176 0x7bc00600 VERTEX2F(-2176, 1536)
177 0x7c400600 VERTEX2F(-1920, 1536)
178 0x7cc00600 VERTEX2F(-1664, 1536)
179 0x7d400600 VERTEX2F(-1408, 1536)
180 0x7dc00600 VERTEX2F(-1152, 1536)
181 0x7e400600 VERTEX2F(-896, 1536)
182 0x7ec00600 VERTEX2F(-640, 1536)
183 0x7f400600 VERTEX2F(-384, 1536)
184 0x7fc00600 VERTEX2F(-128, 1536)
185 0x40400600 VERTEX2F(128, 1536)
186 0x40c00600 VERTEX2F(384, 1536)
187 0x41400600 VERTEX2F(640, 1536)
188 0x41c00600 VERTEX2F(896, 1536)
189 0x42400600 VERTEX2F(1152, 1536)
190 0x42c00600 VERTEX2F(1408, 1536)
191 0x43400600 VERTEX2F(1664, 1536)
192 0x43c00600 VERTEX2F(1920, 1536)
193 0x44400600 VERTEX2F(2176, 1536)
194 0x44c00600 VERTEX2F(2432, 1536)
195 0x45400600 VERTEX2F(2688, 1536)
196 0x45c00600 VERTEX2F(2944, 1536)
197 0x01800088 BITMAP_SOURCE(0x800000 | 136)
198 0x7c407c00 VERTEX2F(-1920, -1024)
199 0x0180008c BITMAP_SOURCE(0x800000 | 140)
200 0x7cc07c00 VERTEX2F(-1664, -1024)
201 0x01800090 BITMAP_SOURCE(0x800000 | 144)
202 0x7d407c00 VERTEX2F(-1408, -1024)
203 0x01800094 BITMAP_SOURCE(0x800000 | 148)
204 0x7dc07c00 VERTEX2F(-1152, -1024)
205 0x01800098 BITMAP_SOURCE(0x800000 | 152)
206 0x7e407c00 VERTEX2F(-896, -1024)
207 0x7ec07c00 VERTEX2F(-640, -1024)
208 0x7f407c00 VERTEX2F(-384, -1024)
209 0x7fc07c00 VERTEX2F(-128, -1024)
210 0x40407c00 VERTEX2F(128, -1024)
211 0x40c07c00 VERTEX2F(384, -1024)
212 0x41407c00 VERTEX2F(640, -1024)
213 0x41c07c00 VERTEX2F(896, -1024)
214 0x0180009c BITMAP_SOURCE(0x800000 | 156)
215 0x42407c00 VERTEX2F(1152, -1024)
216 0x018000a0 BITMAP_SOURCE(0x800000 | 160)
217 0x42c07c00 VERTEX2F(1408, -1024)
218 0x018000a4 BITMAP_SOURCE(0x800000 | 164)
219 0x43407c00 VERTEX2F(1664, -1024)
220 0x018000a8 BITMAP_SOURCE(0x800000 | 168)
221 0x7c407e00 VERTEX2F(-1920, -512)
222 0x7c400000 VERTEX2F(-1920, 0)
223 0x018000ac BITMAP_SOURCE(0x800000 | 172)
224 0x7cc07e00 VERTEX2F(-1664, -512)
225 0x7cc00000 VERTEX2F(-1664, 0)
226 0x018000b0 BITMAP_SOURCE(0x800000 | 176)
227 0x7d407e00 VERTEX2F(-1408, -512)
228 0x7d400000 VERTEX2F(-1408, 0)
229 0x018000b4 BITMAP_SOURCE(0x800000 | 180)
230 0x7dc07e00 VERTEX2F(-1152, -512)
231 0x7dc00000 VERTEX2F(-1152, 0)
232 0x018000b8 BITMAP_SOURCE(0x800000 | 184)
233 0x42c07e00 VERTEX2F(1408, -512)
234 0x42c00000 VERTEX2F(1408, 0)
235 0x018000bc BITMAP_SOURCE(0x800000 | 188)
236 0x43407e00 VERTEX2F(1664, -512)
237 0x018000c0 BITMAP_SOURCE(0x800000 | 192)
238 0x43400000 VERTEX2F(1664, 0)
239 0x018000c4 BITMAP_SOURCE(0x800000 | 196)
240 0x7c400200 VERTEX2F(-1920, 512)
241 0x018000c8 BITMAP_SOURCE(0x800000 | 200)
242 0x7cc00200 VERTEX2F(-1664, 512)
243 0x018000cc BITMAP_SOURCE(0x800000 | 204)
244 0x7d400200 VERTEX2F(-1408, 512)
245 0x018000d0 BITMAP_SOURCE(0x800000 | 208)
246 0x7dc00200 VERTEX2F(-1152, 512)
247 0x018000d4 BITMAP_SOURCE(0x800000 | 212)
248 0x7e400200 VERTEX2F(-896, 512)
249 0x7ec00200 VERTEX2F(-640, 512)
250 0x7f400200 VERTEX2F(-384, 512)
251 0x7fc00200 VERTEX2F(-128, 512)
252 0x40400200 VERTEX2F(128, 512)
253 0x40c00200 VERTEX2F(384, 512)
254 0x41400200 VERTEX2F(640, 512)
255 0x41c00200 VERTEX2F(896, 512)
256 0x018000d8 BITMAP_SOURCE(0x800000 | 216)
257 0x42400200 VERTEX2F(1152, 512)
258 0x018000dc BITMAP_SOURCE(0x800000 | 220)
259 0x42c00200 VERTEX2F(1408, 512)
260 0x018000e0 BITMAP_SOURCE(0x800000 | 224)
261 0x43400200 VERTEX2F(1664, 512)
262 0x018000e4 BITMAP_SOURCE(0x800000 | 228)
263 0x79c00800 VERTEX2F(-3200, 2048)
264 0x7a400800 VERTEX2F(-2944, 2048)
265 0x7ac00800 VERTEX2F(-2688, 2048)
266 0x7b400800 VERTEX2F(-2432, 2048)
267 0x7bc00800 VERTEX2F(-2176, 2048)
268 0x7c400800 VERTEX2F(-1920, 2048)
269 0x7cc00800 VERTEX2F(-1664, 2048)
270 0x7d400800 VERTEX2F(-1408, 2048)
271 0x7dc00800 VERTEX2F(-1152, 2048)
272 0x7e400800 VERTEX2F(-896, 2048)
273 0x7ec00800 VERTEX2F(-640, 2048)
274 0x7f400800 VERTEX2F(-384, 2048)
275 0x7fc00800 VERTEX2F(-128, 2048)
276 0x40400800 VERTEX2F(128, 2048)
277 0x40c00800 VERTEX2F(384, 2048)
278 0x41400800 VERTEX2F(640, 2048)
279 0x41c00800 VERTEX2F(896, 2048)
280 0x42400800 VERTEX2F(1152, 2048)
281 0x42c00800 VERTEX2F(1408, 2048)
282 0x43400800 VERTEX2F(1664, 2048)
283 0x43c00800 VERTEX2F(1920, 2048)
284 0x44400800 VERTEX2F(2176, 2048)
285 0x44c00800 VERTEX2F(2432, 2048)
286 0x45400800 VERTEX2F(2688, 2048)
287 0x45c00800 VERTEX2F(2944, 2048)
288 0x23000000 RESTORE_CONTEXT()
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: BT81x and Animation support
« Reply #5 on: November 18, 2019, 08:10:44 PM »

There is a new EVE Asset Builder - v1.2.0 - and I like it.  :)

With regards to this thread it is now possible to set the tiling manually or disable it entirely.
Thanks!

Also interesting is the option to feed it GIF animations. :)
Logged