sylware / nyanmp (public) (License: AGPLv3) (since 2020-02-12) (hash sha1)
intended to become a collection of media players for gnu/linux based on ffmpeg, alsa, vulkan, x11, wayland, etc.
List of commits:
Subject Hash Author Date (UTC)
npv: less incorrect reprogramming of blits b319e79f4f1b79670f6eef754142cc65c891ad4b Sylvain BERTRAND 2020-09-12 15:14:27
npv:fix osd restoration 8c64f703eca6b8c54b4cb5c95231dd02aa394135 Sylvain BERTRAND 2020-08-29 20:36:12
npv:osd:solo compilation modulo a few warnings 7805bd8f34f913b1535cc81c5be2a3132bd7e0e5 Sylvain BERTRAND 2020-08-29 14:51:35
npv: cleanup and color component fix 44f294e1de96c7974740f1187ebdbe12204884ae Sylvain BERTRAND 2020-08-28 23:48:18
npv:osd:timer, will add more if pertinent 6d34403c2c49bfa6ccf8e7a72e35a69e6f0527c5 Sylvain BERTRAND 2020-08-28 22:47:18
npv/npa: document properly snd_pcm_drain behavior 510ca39ee6a9ac9fcd646484793b7556eaa5972f Sylvain BERTRAND 2020-08-26 17:36:29
npv:remove locale layout dependent key binds f69bbbe529045b4243ece8957c838cb1465352da Sylvain BERTRAND 2020-08-24 21:27:08
npv: global seek based on audio timeline only 3c8fd60fa0a67143fa16ac90565bfcc35a193b6b Sylvain BERTRAND 2020-08-24 18:41:16
npv:_reasonable_ "pedanticage" of the code c5f2644d6eba84bcbcc9b0599c41e1f6733ea95c Sylvain BERTRAND 2020-08-20 16:25:50
npa:some amount of pedanticage 554bd5b07b1a82eabb2622cbf565031bf7af5c6d Sylvain BERTRAND 2020-08-18 19:33:47
hacking again on it after a rather long time cc09df4f340c9f906e0de9520d2c803ea6936769 Sylvain BERTRAND 2020-08-16 18:14:14
npv:fix initial volume not being stored ef66775061157e5af7d6938d06f38e6e7d06a873 Sylvain BERTRAND 2020-08-15 16:59:23
npv:fixing the fix 2043d3ae57ff8b4c26acfd1ee2ff8958cb887ab8 Sylvain BERTRAND 2020-07-17 19:11:14
npv:fixing minor annoyances 2b1895f92933d41a7eb6b7638a94f526e1b5e7cd Sylvain BERTRAND 2020-07-17 19:03:47
npv:spurious namespace tag 65b5c4970e0c0b651ff8d9d61ce2ab0654a039fd Sylvain BERTRAND 2020-06-06 23:22:19
npv:namespace cleanup, don't need that many short identifiers 86d95bbd53a6c9264a44ae98038db9bf4d195e29 Sylvain BERTRAND 2020-06-06 22:44:11
npv:aspect ratio handling 946f160f000a6def790ea64cde5fd31a284f2bd7 Sylvain BERTRAND 2020-06-05 22:21:40
npv:vulkan refactoring to prepare resize handling e6ce6ebf7540d3e7ac2587400e3c0b5289369d19 Sylvain BERTRAND 2020-06-03 17:48:39
npv: x11 wm sugar, fullscreen 7801421eea4849e855916665ede8e9b325520118 Sylvain BERTRAND 2020-06-02 13:39:16
npa: fix initial scheduling bd228fb06dda312888dc6425ebc08dfb2c1d06ae Sylvain BERTRAND 2020-06-02 10:17:42
Commit b319e79f4f1b79670f6eef754142cc65c891ad4b - npv: less incorrect reprogramming of blits
Author: Sylvain BERTRAND
Author date (UTC): 2020-09-12 15:14
Committer name: Sylvain BERTRAND
Committer date (UTC): 2020-09-12 15:14
Parent(s): 8c64f703eca6b8c54b4cb5c95231dd02aa394135
Signer:
Signing key:
Signing status: N
Tree: 048ec2218509d4b9f0fdb92f81b4bb985f3507b2
File Lines added Lines deleted
npv/video/local/code.frag.c 27 8
npv/video/local/state.frag.c 1 0
npv/video/public/code.frag.c 3 4
npv/vk/local/code.frag.c 0 1
File npv/video/local/code.frag.c changed (mode: 100644) (index 9c78014..285cfab)
... ... STATIC void init_once_local(void)
70 70 blit_l[i].vp.bottom_right.x = -1; blit_l[i].vp.bottom_right.x = -1;
71 71 blit_l[i].vp.bottom_right.y = -1; blit_l[i].vp.bottom_right.y = -1;
72 72 blit_l[i].vp.bottom_right.z = -1; blit_l[i].vp.bottom_right.z = -1;
73 blit_l[i].update_requested = true;
73 74 ++i; ++i;
74 75 } }
75 76 receive_fr_l = avutil_video_fr_ref_alloc(); receive_fr_l = avutil_video_fr_ref_alloc();
 
... ... STATIC void blit_compute_offsets(u8 swpchn_img,
451 452 vp->width = new_vp->width; vp->width = new_vp->width;
452 453 vp->height = new_vp->height; vp->height = new_vp->height;
453 454 } }
454 STATIC void blit_setup(u8 swpchn_img, bool scaler_dims_changed)
455 STATIC void blit_setup(u8 swpchn_img)
455 456 { {
456 457 s32 r; s32 r;
457 458 struct vk_cb_begin_info_t begin_info; struct vk_cb_begin_info_t begin_info;
 
... ... STATIC void blit_setup(u8 swpchn_img, bool scaler_dims_changed)
463 464
464 465 current = &npv_vk_surf_p.dev.phydev.surf_caps.core.current_extent; current = &npv_vk_surf_p.dev.phydev.surf_caps.core.current_extent;
465 466
466 if (!scaler_dims_changed && blit_l[swpchn_img].vp.width
467 == current->width && blit_l[swpchn_img].vp.height
468 == current->height)
467 if (!blit_l[swpchn_img].update_requested
468 && blit_l[swpchn_img].vp.width == current->width
469 && blit_l[swpchn_img].vp.height == current->height)
469 470 return; return;
470 471
471 472 blit_compute_offsets(swpchn_img, current); blit_compute_offsets(swpchn_img, current);
 
... ... STATIC void blit_setup(u8 swpchn_img, bool scaler_dims_changed)
525 526 /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
526 527 vk_end_cb(npv_vk_surf_p.dev.cbs[swpchn_img]); vk_end_cb(npv_vk_surf_p.dev.cbs[swpchn_img]);
527 528 IF_FATALVVK("%d:swapchain img:%u:command buffer:%p:unable to end recording\n", r, swpchn_img, npv_vk_surf_p.dev.cbs[swpchn_img]); IF_FATALVVK("%d:swapchain img:%u:command buffer:%p:unable to end recording\n", r, swpchn_img, npv_vk_surf_p.dev.cbs[swpchn_img]);
529 blit_l[swpchn_img].update_requested = false;
530 }
531 /*NSPC*/
532 STATIC void blits_request_update(void)
533 {
534 u8 i;
535
536 i = 0;
537 loop {
538 if (i == npv_vk_surf_p.dev.swpchn.imgs_n)
539 break;
540 blit_l[i].update_requested = true;
541 ++i;
542 }
528 543 } }
529 544 #define READY 0 #define READY 0
530 545 #define NOT_READY 1 #define NOT_READY 1
 
... ... STATIC u8 swpchn_next_img(u32 *swpchn_img) { loop
544 559 return NOT_READY; return NOT_READY;
545 560 else if (r == vk_out_of_date || r == vk_suboptimal) { else if (r == vk_out_of_date || r == vk_suboptimal) {
546 561 npv_vk_swpchn_update(); npv_vk_swpchn_update();
562 blits_request_update();
547 563 continue; continue;
548 564 } else if (r >= 0) } else if (r >= 0)
549 565 return READY; return READY;
 
... ... STATIC u8 send_to_pe(u32 swpchn_img)
588 604 vk_q_present(&present_info); vk_q_present(&present_info);
589 605 if (r == vk_out_of_date || r == vk_suboptimal) { if (r == vk_out_of_date || r == vk_suboptimal) {
590 606 npv_vk_swpchn_update(); npv_vk_swpchn_update();
607 blits_request_update();
591 608 return SWPCHN_UPDATED; return SWPCHN_UPDATED;
592 609 } }
593 610 IF_FATALVVK("%d:queue:%p:unable to submit the image %u to the presentation engine\n", r, npv_vk_surf_p.dev.q, swpchn_img); IF_FATALVVK("%d:queue:%p:unable to submit the image %u to the presentation engine\n", r, npv_vk_surf_p.dev.q, swpchn_img);
 
... ... STATIC u8 send_to_pe(u32 swpchn_img)
596 613 #undef SENT #undef SENT
597 614 #undef SWPCHN_UPDATED #undef SWPCHN_UPDATED
598 615 STATIC void start_scaling(avutil_video_fr_ref_t *fr, STATIC void start_scaling(avutil_video_fr_ref_t *fr,
599 struct dec_fr_priv_t *fr_priv, bool *scaler_dims_changed)
616 struct dec_fr_priv_t *fr_priv)
600 617 { {
618
601 619 if (scaler_p.ctx->cfg.width != fr->width if (scaler_p.ctx->cfg.width != fr->width
602 620 || scaler_p.ctx->cfg.height != fr->height) { || scaler_p.ctx->cfg.height != fr->height) {
621 u8 i;
622
603 623 if (scaler_p.img.vk != 0) if (scaler_p.img.vk != 0)
604 624 scaler_img_destroy(); scaler_img_destroy();
605 625 scaler_img_create(fr); scaler_img_create(fr);
 
... ... STATIC void start_scaling(avutil_video_fr_ref_t *fr,
610 630 scaler_img_dev_mem_bind(); scaler_img_dev_mem_bind();
611 631 scaler_img_dev_mem_map(); scaler_img_dev_mem_map();
612 632
613 *scaler_dims_changed = true;
633 blits_request_update();
614 634 scaler_p.ctx->cfg.width = fr->width; scaler_p.ctx->cfg.width = fr->width;
615 635 scaler_p.ctx->cfg.height = fr->height; scaler_p.ctx->cfg.height = fr->height;
616 636 npv_video_osd_update_dimensions(scaler_p.img.data, npv_video_osd_update_dimensions(scaler_p.img.data,
617 637 (u16)fr->width, (u16)fr->height, (u16)fr->width, (u16)fr->height,
618 638 (u32)scaler_p.img.layout.row_pitch); (u32)scaler_p.img.layout.row_pitch);
619 } else
620 *scaler_dims_changed = false;
639 }
621 640 scaler_p.ctx->cfg.src_fmt = fr->fmt; scaler_p.ctx->cfg.src_fmt = fr->fmt;
622 641 scaler_p.ctx->cfg.dst_fmt = AVUTIL_PIX_FMT_RGB32; scaler_p.ctx->cfg.dst_fmt = AVUTIL_PIX_FMT_RGB32;
623 642 scaler_p.ctx->cfg.flags = SWS_POINT; /* | SWS_PRINT_INFO */ scaler_p.ctx->cfg.flags = SWS_POINT; /* | SWS_PRINT_INFO */
File npv/video/local/state.frag.c changed (mode: 100644) (index 6ae80a5..f62d490)
... ... STATIC struct {
13 13 struct vk_offset_3d_t top_left; struct vk_offset_3d_t top_left;
14 14 struct vk_offset_3d_t bottom_right; struct vk_offset_3d_t bottom_right;
15 15 } vp; } vp;
16 bool update_requested;
16 17 } blit_l[npv_vk_swpchn_imgs_n_max]; } blit_l[npv_vk_swpchn_imgs_n_max];
17 18 STATIC avutil_video_fr_ref_t *last_fr_sent_to_pe_l; STATIC avutil_video_fr_ref_t *last_fr_sent_to_pe_l;
File npv/video/public/code.frag.c changed (mode: 100644) (index abea91c..3c2fc4b)
... ... STATIC void timer_evt(void)
204 204 s64 now; s64 now;
205 205 avutil_video_fr_ref_t *fr; avutil_video_fr_ref_t *fr;
206 206 struct dec_fr_priv_t *fr_priv; struct dec_fr_priv_t *fr_priv;
207 bool scaler_dims_changed;
208 207 u32 swpchn_img; u32 swpchn_img;
209 208
210 209 timer_ack(); timer_ack();
 
... ... STATIC void timer_evt(void)
229 228 if (npv_thdsws_is_busy(scaler_p.ctx)) if (npv_thdsws_is_busy(scaler_p.ctx))
230 229 return; return;
231 230 if (scaler_p.img.fr != fr) { if (scaler_p.img.fr != fr) {
232 start_scaling(fr, fr_priv, &scaler_dims_changed);
231 start_scaling(fr, fr_priv);
233 232 return; return;
234 233 } }
235 234 if (npv_paused_p) if (npv_paused_p)
236 235 npv_video_osd_rop_restore(); npv_video_osd_rop_restore();
237 236 npv_video_osd_rop_blend(now); npv_video_osd_rop_blend(now);
238 loop { /* because the swpchn can change, aka "the win changed" */
237 loop { /* because the swpchn can change for many reasons */
239 238 r = swpchn_next_img(&swpchn_img); r = swpchn_next_img(&swpchn_img);
240 239 if (r == NOT_READY) if (r == NOT_READY)
241 240 return; return;
242 blit_setup(swpchn_img, scaler_dims_changed);
241 blit_setup(swpchn_img);
243 242 r = send_to_pe(swpchn_img); r = send_to_pe(swpchn_img);
244 243 if (r == SENT) if (r == SENT)
245 244 break; break;
File npv/vk/local/code.frag.c changed (mode: 100644) (index dd5e2ee..f996199)
... ... STATIC void swpchn_reinit(void)
862 862 STATIC void swpchn_imgs_get(void) STATIC void swpchn_imgs_get(void)
863 863 { {
864 864 s32 r; s32 r;
865 u8 target_imgs_n;
866 865 /* /*
867 866 * TODO: should try to figure out how to favor double buf over * TODO: should try to figure out how to favor double buf over
868 867 * everything else * everything else
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/nyanmp

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/nyanmp

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/nyanmp

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main