**** BEGIN LOGGING AT Fri May 06 02:59:56 2022 May 06 18:12:51 zmatt, where does the bi-quad filter code come from which you pasted bin ? May 06 19:17:56 jfsimon1981_b: ehh, I just wrote it for the occasion? like, I'm not sure what you mean, the biquad filter itself is literally just a single expression (y0 = b0 x0 + b1 x1 + b2 x2 - a1 y1 - a2 y2) May 06 19:19:31 more symmetrically, a biquad solves the equation a0 y0 + a1 y1 + a2 y2 = b0 x0 + b1 x1 + b2 x2 for y0 (the current output sample) May 06 19:19:50 where a0 is generally implicit 1 May 06 19:38:21 i meant thecode snipper May 06 19:38:33 https://pastebin.com/hwwVR6wT May 06 19:53:26 yes so am I May 06 19:55:21 the point of that doc was just to show how trivial a biquad is, and to give the actual coefficients for the biquads used by the load cell mattb0ne uses (based on the documentation of that load cell) May 06 19:57:48 where was the code you pasted from, is this an open source project or one of yours ? May 06 19:58:01 Seems interesting May 06 19:58:14 20:17 <@zmatt> jfsimon1981_b: ehh, I just wrote it for the occasion May 06 19:58:31 This peace of C code ? May 06 19:59:06 including coeficients so on ... May 06 19:59:21 20:55 <@zmatt> the point of that doc was just to show how trivial a biquad is, and to give the actual coefficients for the biquads used by the load cell mattb0ne uses (based on the documentation of that load cell) May 06 20:00:00 I computed the coefficients from the filter specs (2nd order butterworth with given cutoff frequencies, with a 1200 Hz sample rate) May 06 20:00:25 ok May 06 20:01:15 it's not meant to be interesting code, it's trivial code written very verbosely for illustration purposes May 06 20:01:41 maybe or you, I have more difficulties in C than C++ May 06 20:02:20 though you're right now i get a closer look May 06 20:21:20 By any chance do you know how we can accelerate 2D on the beagleboard black ? I understood the SGX530 if for 3D accele only May 06 20:21:45 Though i understood QT applications can use it somehow, i'm unsure about this May 06 20:24:46 accelerate 2d in what way? May 06 20:25:57 For instance when displaying a videos with mplayer, or animating sprites with SFML, this loads the cpu quite a lot May 06 20:26:14 and can't get smooth in full res. May 06 20:27:07 I'll have to investigate this topic. I might have future projects related to graphic things with the BB May 06 20:27:10 reduce resolution or use more efficient code May 06 20:27:18 At the moment had to lower resolution so things work well. May 06 20:27:42 But I had 3D code running with opengles a while ago, that was much better May 06 20:27:56 video decoding is generally very cpu-heavy... some devices have hardware acceleration for decoding and/or encoding video using specific codecs, the AM335x does not May 06 20:28:06 you're describing very very different things May 06 20:28:27 I think that's about openglES, unlike opengl, which most applications can use for 2D stuff. Not ES. May 06 20:28:41 video decoding performance will depends on how well-tuned the code is to the Cortex-A8 + NEON May 06 20:28:56 I mean drawing, that's slow and apparently draws the cpu a lot May 06 20:29:03 i think May 06 20:29:19 if "animating sprites" is slow then the code is probably just shit May 06 20:29:31 oh May 06 20:29:53 since there's not really much to compute there, it's just copy-pasting bits May 06 20:29:57 Well maybe, i used SFML, compiled on the beagle and used it straight away May 06 20:30:06 have to check what's Neon May 06 20:30:29 then SFML is probably just very cpu-heavy, and no form of acceleration will help with that May 06 20:31:06 or maybe they're just doing something that happens to cause a huge negative performance impact May 06 20:31:35 indeed it loads the cpu May 06 20:31:50 drawing takes time May 06 20:31:56 I mean, obviously it does, but... I meant more like overhead than actual drawing May 06 20:32:03 but who knows, I don't know what it does or why it might be slow May 06 20:32:16 like, "drawing" is too vague a term anyway May 06 20:32:39 i mean a lot of time, full screen full res it can be about 10 fps or so, maybe less May 06 20:32:48 doing what? May 06 20:32:58 the draw function May 06 20:33:01 doing what? May 06 20:33:12 that updates a full screen with a new image for example, May 06 20:33:18 drawing May 06 20:33:27 draw function May 06 20:33:30 again, "drawing" is very non-specific, what do you mean by that? May 06 20:34:26 you draw the background, move a sprite, then draw it, draw all shapes, then display them, every loop May 06 20:34:30 don't repeat the same vagueness, clarify what you mean. obviously the performance of "drawing" onto screen is entirely dependent on what kind of drawing operations you're doing and how they are implemented May 06 20:34:52 also, what's your screen resolution? May 06 20:34:58 It's just a textures box May 06 20:35:07 i tried full res so 1280x80 May 06 20:35:09 i tried full res so 1280x800 May 06 20:36:00 that did'nt work well, as i mentionned it just loaded too much the cpu. On a computer, sfml goes through the graphic cardfor doing all 2D stuff (obviously), but not on the bb May 06 20:36:47 I'm not sure how the graphics card would help much for drawing... I guess for scaling with anti-aliasing, or transparency? May 06 20:36:55 what API does it use? May 06 20:37:26 Just drawing pixels which goes from VRAM to the back buffer, that's pretty fast May 06 20:38:42 I guess the GPU could in theory blit pixels faster than the CPU, dunno by how much... May 06 20:39:23 anyway, I can't really offer much insight into the performance of a library I don't know performing unspecified operations May 06 20:40:53 it's just moving sprites and wraing them, like running a counter May 06 20:41:04 for blitting the main bottleneck will be RAM, and how it's being accessed.... e.g. if code makes the mistake of reading from a framebuffer (which is uncached) then performance will immediately tank May 06 20:41:36 like here https://www.sfml-dev.org/tutorials/2.5/graphics-draw.php May 06 20:42:02 that's right it made me think about this bottleneck, maybe ram access May 06 20:42:11 wait, is it using OpenGL ? May 06 20:42:27 that will have absolutely TERRIBLE performance since it'll use a software-implementation of a 3D rendering engine May 06 20:42:39 cause it loads the cpu, which is just waiting for ram operations to go. Since this is share ram. There's no vram on the chip i think May 06 20:42:51 Not using openGL in that case. May 06 20:43:13 indeed i tried, performance drops by factor of 10 or more. May 06 20:43:33 are you sure it's not using opengl? May 06 20:43:49 Not 100% May 06 20:44:13 SFML seems to have a hard dependency on opengl, so it sounds to me like it's using it for all graphics May 06 20:44:15 That's a possibility. May 06 20:44:38 that could be why it is so slow ? May 06 20:44:50 that's what I literally just said May 06 20:45:06 yes i see May 06 20:45:13 and didn't we actually already establish this a while back? I'm having a deju vu May 06 20:45:21 maybe it was someone else May 06 20:45:40 i think it was something else though i probably asked about this or related topic May 06 20:46:37 I inquired opengles, also 2D acceleration, though i'll investigate on the SFML library if that's the trouble it using GL May 06 20:46:49 Why would openGL be slow if you happen to know ? May 06 20:46:58 https://libera.irclog.whitequark.org/beagle/2022-03-17#1647541760-1647541977; May 06 20:47:08 yes I know, and literally just told you 4 minutes ago May 06 20:47:27 it'll use a software-implementation of OpenGL May 06 20:47:41 ah May 06 20:47:53 yes i see May 06 20:48:40 maybe i'll have to check how to compile it differently or try a new library to get better performances May 06 20:48:42 the GPU driver supports OpenGL ES and OpenGL ES 2, and does not support X11 (only Wayland or running applications directly on the framebuffer) May 06 20:48:56 it looks to me like SFML has a hard dependency on OpenGL May 06 20:48:59 indeed it seems unlogical to have poor perf, with a 1Ghz proc that's plenty May 06 20:49:18 yep i think it has to go through it, though i can check further May 06 20:49:28 they have a support forum, i'll post on it May 06 20:49:32 it's not that fast, and clock frequency isn't the only performance indicator May 06 20:49:40 too bad i love sfml, it's so simple to use May 06 20:50:02 the AM335x is not designed for heavy graphics, it's designed for industrial applications May 06 20:51:14 I think the main reason they included a (very basic) 3d gpu is because they apparently wanted to support Android for touchscreen interfaces, which apparently requires a gpu May 06 20:52:41 I had 4 digits of 64x40 to animate that means draw them all and draw a 200x100 texture, each frame, and that got much too slow that it flickered at about 10~15 fps, so the cpu's not at fault, i think that 's the soft implementaton of GL, you raised it that probably why. May 06 20:53:04 Not asking a lot with this simple animation. May 06 20:53:22 Ah May 06 20:53:40 yes and no, you're not asking a lot but the way it's done probably asking a lot May 06 20:53:44 anyway May 06 20:53:52 so you're also using X11 here? May 06 20:54:11 i think so yes May 06 20:54:21 what do you mean May 06 20:54:41 I run though (forgot it) May 06 20:54:46 I guess it's a stupid question since SFML depends on it May 06 20:54:55 LXDE was too heavy, I moved to XFCE May 06 20:55:36 yes i run X, i installed the lightweight manager May 06 20:56:32 flickering is a problem there because the fbdev video driver can't do double-buffering and the modesetting video driver apparently causes the lcdc kernel driver to crash for some reason May 06 20:56:53 what's fbdev2 May 06 20:56:59 there are both May 06 20:57:04 ? May 06 20:57:23 i was playing with mplayer and it proposed fbdev and fbdev2 May 06 20:57:31 though only the 2nd works May 06 20:57:35 must be some mplayer-specific thing May 06 20:58:33 yes i'm animating a counted with 4 digits and playing fun stuff videos, so i had to work with a video player and a graphic lib May 06 20:59:21 documentation just says it's an "alternative implementation" ... with no explanation of why mplayer has two different fbdev video output implementations or when you might want to use which May 06 20:59:45 sounds like the beaglebone is not a great match to your application May 06 21:00:41 maybe May 06 21:01:32 but i'd like to get those things work with OpenGL ES, that's way to go May 06 21:01:47 ES or ES 2 ? (they're _very_ different APIs) May 06 21:02:01 I don't see how either of those would help you here though May 06 21:02:12 the only difficulty is then to program the graphic stuff. Working with gles is more complex than just animating with sfml 2d. May 06 21:02:19 Gles probably to begin with May 06 21:03:39 i saw discussions about players using the SGX card, on raspberry May 06 21:03:43 honestly unless you're doing 3d rendering I'm not how it would help May 06 21:04:01 i think there can be special purpose players optimized for this hardware, did'nt investigate yet May 06 21:04:09 I definitely don't see how it would help with video May 06 21:04:22 no for animating stuff May 06 21:04:58 well if you look straight it's almost 2d May 06 21:05:29 yes I know you *can* use opengl for 2d, but I'm not sure it would actually be faster here May 06 21:06:04 I animated aircraft's instruments on a beagle with gles years ago and that worked well, though it's all done in 3d with gles, really this looks flat and therefore it's kind of 2d May 06 21:06:15 that's what i need nowadays as well, May 06 21:09:34 I mean, you do you I guess, but that doesn't sound particularly simple and is almost certainly also not very efficient... basic 2d stuff may very well be faster on the cpu (when the code doesn't suck) than the gpu when taking into account all the overhead involved with talking to the gpu.... but i'll depend on the details I guess May 06 21:11:11 that's right May 06 21:12:01 i meant it's really fun to me working with opengles and eventually going a bit artistic, also it would unload the cpu May 06 21:12:30 i'm maybe lost indeed, but i need a good library for 2d stuff which i have'nt found yet May 06 21:13:29 i had sfml but i'll probably loose it for something else, for the emnbedded due to this GL issue. I don't think it can be turned around, i think sfml is kind overlay for opengl May 06 21:13:57 yes my impression is also that it's entirely built around opengl May 06 21:14:08 i'm trying to remember a few ones, maybe just try qt anyway May 06 21:14:15 if that can work for bb May 06 21:14:28 yes it's entirely built upon it i think May 06 21:15:31 also the fact SGX is a UK company and i like them, but there are other ways quite sure, that will perform good May 06 21:18:04 i'll give a try on Qt, i find it too complex though May 06 21:18:07 qt5 can definitely run directly on the framebuffer... there's also directfb (or rather, directfb2) and things that use it May 06 21:18:19 but maybe because i did'nt get into it much May 06 21:18:28 yes that's what i see May 06 21:18:40 though it surely need x server to be running May 06 21:18:48 no May 06 21:18:54 ah May 06 21:19:02 interesting May 06 21:19:20 like, the whole point of directfb is that it's for using directly on the fb... hence the name :P May 06 21:19:42 ok May 06 21:19:50 that's simpler than i though May 06 21:20:10 i'll get on that pretty soon May 06 21:20:19 and it has a drm/kms backend, so you're not stuck with the old linux fbdev backend May 06 21:20:29 hence double-buffering will also be supported May 06 21:20:31 ok May 06 21:20:36 (so no flickering) May 06 21:22:18 yes i had that issue too May 06 21:22:51 i kind of dealt with it but it's not good code and solutions i found at the moment. May 06 21:22:55 not sure where one is supposed to find its documentation though :P the directfb2 page just appears to be a long readme May 06 21:23:12 fbdev has'nt a backbuffer right May 06 21:23:45 yeah the old fbdev interface supports neither double-buffering nor changing the video mode (resolution / framerate) May 06 21:23:57 (on the am335x anyway) May 06 21:24:32 all right May 06 21:25:04 basically, when the video output is enabled the kernel will pick a video mode and then create a single framebuffer for use by fbdev, and it'll display that framebuffer by default if no application is using drm May 06 21:26:55 ok May 06 21:27:20 while with drm framebuffers are explicitly allocated by userspace, and you can then perform a "page flip" which changes the active framebuffer (either immediately, which may cause tearing, or on the next vsync to avoid tearing) May 06 21:27:20 i'll implement the qt5 application see how that goes, eventually play a bit with the drivers the May 06 21:28:04 with recent versions of qt5 the "linuxfb" platform plugin also supports drm/kms, but I don't remember if it'll use it by default or if this requires explicit config May 06 21:28:28 ok May 06 21:28:33 do you use qt5 May 06 21:30:15 I haven't done any GUI stuff on the bbb for many many years, but back then we used qt5 yes.... my job was just to get it working though, I didn't do any actual qt5 programming May 06 21:30:42 ok May 06 21:31:27 do you remind we discussed the pwm stuff back few weeks, that's this same project ; it's for Prowein in Germany May 06 21:31:58 I don't remember no May 06 21:32:07 I talk about many things with many people :P May 06 21:32:26 they collect corks in wood hand held bags, and that hardware is detecting them, counting and animating a small panel 10 inch, with the count number and fancy video May 06 21:33:10 that's this whole project though i got involved in doing a bit more, like power supply, Ui so on May 07 02:12:51 Fri. Funday! May 07 02:13:05 Get your BBBs ready...go. May 07 02:13:29 BBBs only? May 07 02:14:05 I noticed that on the forums, mattb0ne, someone was inquiring about some PRU business w/ sensors along with quadrature. May 07 02:14:09 Nope. May 07 02:14:13 Not only the BBBs. May 07 02:14:20 But, the BBBW too! May 07 02:14:26 and AI! May 07 02:14:52 I would say BBBlue but I am missing something along the lines of producing w/ it for now. May 07 02:15:11 ds2: How are you doing? May 07 02:17:02 mattb0ne: This may be a good way to teach me and that person inquiring! May 07 02:17:51 The person went from MotorCape to PRU. I do not know much about the PRU for now. May 07 02:27:57 Anyway...Funday will persist! May 07 02:34:22 For another hour and a half, funday all day! May 07 02:48:49 hey set_...surviving... u? May 07 02:53:13 Me. May 07 02:53:14 Yes. May 07 02:53:16 Sort of. May 07 02:53:30 I just got over a back injury. But outside of that, good to go. May 07 02:53:56 i worked yesterday doing all sorts of random junk work. But, I got some dollars for it. Boo! May 07 02:54:15 I should pay the owner of the business! May 07 02:54:16 Ha. **** ENDING LOGGING AT Sat May 07 02:59:56 2022