0017-fix-clip-compiler-error.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: jmorganca <jmorganca@gmail.com>
  3. Date: Tue, 25 Feb 2025 19:14:51 -0800
  4. Subject: [PATCH] fix-clip-compiler-error
  5. ---
  6. examples/llava/clip.cpp | 2 +-
  7. examples/llava/clip.h | 2 +-
  8. 2 files changed, 2 insertions(+), 2 deletions(-)
  9. diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp
  10. index 560021c7..54265beb 100644
  11. --- a/examples/llava/clip.cpp
  12. +++ b/examples/llava/clip.cpp
  13. @@ -1788,7 +1788,7 @@ void clip_image_f32_batch_free(struct clip_image_f32_batch * batch) {
  14. }
  15. }
  16. -void clip_build_img_from_pixels(const unsigned char * rgb_pixels, int nx, int ny, clip_image_u8 * img) {
  17. +void clip_build_img_from_pixels(const unsigned char * rgb_pixels, int nx, int ny, struct clip_image_u8 * img) {
  18. img->nx = nx;
  19. img->ny = ny;
  20. img->buf.resize(3 * nx * ny);
  21. diff --git a/examples/llava/clip.h b/examples/llava/clip.h
  22. index ce6f6194..f9f80d7d 100644
  23. --- a/examples/llava/clip.h
  24. +++ b/examples/llava/clip.h
  25. @@ -75,7 +75,7 @@ CLIP_API void clip_image_u8_batch_free (struct clip_image_u8_batch * batch);
  26. CLIP_API void clip_image_f32_batch_free(struct clip_image_f32_batch * batch);
  27. /** build image from pixels decoded by other libraries instead of stb_image.h for better performance. The memory layout is RGBRGBRGB..., input buffer length must be 3*nx*ny bytes */
  28. -CLIP_API void clip_build_img_from_pixels(const unsigned char * rgb_pixels, int nx, int ny, clip_image_u8 * img);
  29. +CLIP_API void clip_build_img_from_pixels(const unsigned char * rgb_pixels, int nx, int ny, struct clip_image_u8 * img);
  30. CLIP_API bool clip_image_load_from_file(const char * fname, struct clip_image_u8 * img);