medmed wrote: ↑Tue Aug 09, 2022 8:08 pm
ThorstenOtto wrote: ↑Tue Aug 09, 2022 3:51 pm
Btw, i found that the openh264 libraries on my site were missing the 020 and v4e libraries. If you need them, just refetch the archive; nothing else has changed.
And atached my current version of the example program. You can experiment with it setting USE_THREADS to 1. The archive also contains a port of this to X11; when i set limit_fps = 0 there, i get around ~260 FPS. So the 27 from aranym is not that bad
One thing i want to try is to use libavcodec instead of openh264. I think it should also be able to decode the files, just have figure out how to invoke it.
Thanks Olivier, Thanks Otto.
Really well done Otto! I have code to read (and above all your pthread implementation)
For avcodec I'm afraid about an eventual hight number of dependencies but I've don't really check for now...
I've tried to implement autoscale and Olivier advises in the code in attachment and in my app code:
In my app code everything is ok but in the test script we use vsclip alway clip at x = 0 & y = 0 and I don't understand why as I try to debug this from hours now.... Perhaps You or Olivier have idea about this issue?
I've implemented libyuv::I420Scale who scale following the size of the window.
Sorry I not understand your question about vs_clip(), regarding your code I not understand why you want do vs_clip, it is not need at any time, I not understand you use vr_recfl() as just after you erase anything draw with vro_cpyfm(). You call vsf_interior() before each redraw set one is enough and in this case if vr_recfl is remove it is not need.
I don't know why you need the first rc_intersect() AES return always return a rectangle inside the working area so you have not to do intersect with working area
Your code
Code: Select all
rect.g_h = 0; rect.g_w = 0; rect.g_x = 0; rect.g_y = 0;
wind_update(BEG_UPDATE);
wind_get(wi_handle, WF_FIRSTXYWH, &rect.g_x, &rect.g_y, &rect.g_w, &rect.g_h);
// if(rect.g_h != 0 && rect.g_w != 0){
while(rect.g_h != 0 && rect.g_w != 0){
if ( rc_intersect((GRECT*)&win_xy[4], &rect) ){
rect_pxy[0] = rect.g_x;
rect_pxy[1] = rect.g_y;
rect_pxy[2] = rect.g_x + rect.g_w - 1;
rect_pxy[3] = rect.g_y + rect.g_h - 1;
printf("2 - x %d y %d\n", xwork, ywork);
vsf_interior(handle, 0);
set_clip(1, rect.g_x, rect.g_y, rect.g_w, rect.g_h);
vr_recfl(handle, rect_pxy);
vro_cpyfm(handle, S_ONLY, rect_pxy, &st_wi_mfdb, &screen_mfdb);
set_clip(0, rect.g_x, rect.g_y, rect.g_w, rect.g_h);
}
wind_get( wi_handle ,WF_NEXTXYWH ,&rect.g_x , &rect.g_y, &rect.g_w, &rect.g_h );
}
printf("out\n");
// } else {
// printf("x %d y %d\n", xwork, ywork);
// vsf_interior(handle, 0);
// set_clip(1, xwork, ywork, wwork, hwork);
// vr_recfl(handle, win_xy);
// vro_cpyfm(handle, S_ONLY, win_xy, &st_wi_mfdb, &screen_mfdb);
// set_clip(0, xwork, ywork, wwork, hwork);
// }
wind_update(END_UPDATE);
show_mouse();
Should be something like this:
Code: Select all
rect.g_w = 0; rect.g_h = 0;
wind_update(BEG_UPDATE);
wind_get(wi_handle, WF_FIRSTXYWH, &rect.g_x, &rect.g_y, &rect.g_w, &rect.g_h);
while(rect.g_h != 0 && rect.g_w != 0){
rect_pxy[0] = rect.g_x;
rect_pxy[1] = rect.g_y;
rect_pxy[2] = rect.g_x + rect.g_w - 1;
rect_pxy[3] = rect.g_y + rect.g_h - 1;
vro_cpyfm(handle, S_ONLY, rect_pxy, &st_wi_mfdb, &screen_mfdb);
if((rect.g_w!=st_wi_mfdb.fd_w) || (rect.g_h!=st_wi_mfdb.fd_h))
wind_get( wi_handle ,WF_NEXTXYWH ,&rect.g_x , &rect.g_y, &rect.g_w, &rect.g_h );
else rect.g_h=0;
}
wind_update(END_UPDATE);
Sorry I can't experiment anything for the moment, I'm far from my Atari system
Olivier