video: merge the tiles of grid heif and avif images#17738
video: merge the tiles of grid heif and avif images#17738guidocella wants to merge 1 commit intompv-player:masterfrom
Conversation
| return 0; | ||
| } | ||
|
|
||
| static char *tile_grid_graph(void *ctx, const struct mp_tile_grid *grid) |
There was a problem hiding this comment.
All of these things belong to f_auto_filters.c, not here.
There was a problem hiding this comment.
I added an auto filter at first but it doesn't seem to be able to handle different streams.
|
I tested this PR. If the preferred hwdec is not a copy variant (--hwdec=d3d11va,d3d11va-copy), grid images fail to load entirely, and it is unable to failback to a copy hwdec and reload.
I suspect the problem in #14062 is that the pixel format isn't yuv420, and currently there are no GPUs capable of yuv422/444 av1. |
|
vaapi-copy also works. |
|
This should be merged after scaling individual tiles, preferably in libplacebo. Otherwise big images won't work. EDIT: But after discussion, we don't care about big images > 16k, so it's not needed. |
|
Is that related to tile grids? Non-grid large images don't work all the same. Also changing libplacebo won't work for dmabuf-wayland. |
Nothing will, you need to make compositor support rendering larger textures or split textures in dmabuf-wayland and make compositor stitch it |
| { | ||
| struct bstr buf = {0}; | ||
|
|
||
| for (int i = 0; i < grid->nb_tiles; i++) |
There was a problem hiding this comment.
Not sure if this is the best layer to do the stitching. Also at this point we probably have information about the source and destination rectangle. Or at least source one based on crop, so we have decode only tiles that contribute to the final image.
Most of those pan-scan and video-zoom props are VO related, so it's interesting task to figure out how to do software pre-stiching to include this information.
There was a problem hiding this comment.
This runs before the window is even created.
And is there a risk of dynamically updating the filter being slower? If I run set lavfi-complex [vid1][vid2]hstack[vo] at runtime, it is far from instant.
Fixes mpv-player#13585. Fixes mpv-player#16486. Switching between different grid images added with --external-files is also supported. The prority of independent tracks is reverted for images, because we now want to select a dependent track to trigger the merging, rather than small preview tracks.

Fixes #13585.
Fixes #16486.
Switching between different grid images added with --external-files is also supported.
The prority of independent tracks is reverted for images, because we now want to select a dependent track to trigger the merging, rather than small preview tracks.
Mostly generated by Claude.
--hwdec=vaapiworks for regular heif images, but breaks grid ones.nvdec works.I get CUDA_ERROR_OUT_OF_MEMORY but at least it fallsback to software decoding.I can't test av1, but hardware decoding already doesn't work at least for HDR avif according to #14062.