Skip to content

mtmd : move helpers to dedicated library (⚠️ breaking change) #13866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 28, 2025

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented May 28, 2025

First breaking change in libmtmd:

  • The mtmd_helpers_* are moved to a dedicated library. If you use the shared library, make sure to link against the new libmtmd_helper_shared with mtmd-helper.h header
  • mtmd_helper_bitmap_init_from_* now takes mtmd_context * ctx as the first argument. This is needed to determine the audio bitrate

Why this change is needed?

  • mtmd-helper is not part of the main library. As the name suggested, it provides a higher-level functions that allow developer to get started with libmtmd more easily. Making it a dedicated library to clarify this idea
  • miniaudio.h and stb_image.h are 2 large single-header dependencies, which can increase compilation time of the main libmtmd. By moving them to mtmd-helper, we reduce this compilation time during the development (QoL improvement for contributors)

@ngxson ngxson requested a review from ggerganov May 28, 2025 16:45
@ngxson ngxson marked this pull request as ready for review May 28, 2025 16:45
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this is mostly code rearrangement. Haven't reviewed in details - let me know if something needs extra attention.

@ngxson
Copy link
Collaborator Author

ngxson commented May 28, 2025

@ggerganov yes most of the changes are just moving the code around. There could be leftover/redundant things (spotted one on 669fe81), but they won't affect the functionality. I will continue clean things up with my upcoming PRs

@ngxson ngxson merged commit 1096133 into ggml-org:master May 28, 2025
40 of 46 checks passed
@ngxson ngxson added the breaking change Changes that break ABIs, APIs, file formats, or other forms of backwards compatibility. label May 30, 2025
@LostRuins
Copy link
Collaborator

clip_image_load_from_bytes is removed? Is it not needed anymore?

I still see

bool clip_image_load_from_bytes(const unsigned char * bytes, size_t bytes_length, struct clip_image_u8 * img);
but where is the implementation?

@ngxson
Copy link
Collaborator Author

ngxson commented May 31, 2025

A lot of things in clip.cpp/h are redundant and they will be all removed in a future PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes that break ABIs, APIs, file formats, or other forms of backwards compatibility. examples server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants