| 4094 | } |
| 4095 | |
| 4096 | bool clip_encode_float_image (struct clip_ctx * ctx, int n_threads, float * img, int h, int w, float * vec) { |
| 4097 | clip_image_f32 clip_img; |
| 4098 | clip_img.buf.resize(h * w * 3); |
| 4099 | for (int i = 0; i < h*w*3; i++) |
| 4100 | { |
| 4101 | clip_img.buf[i] = img[i]; |
| 4102 | } |
| 4103 | clip_img.nx = w; |
| 4104 | clip_img.ny = h; |
| 4105 | clip_image_encode(ctx, n_threads, &clip_img, vec); |
| 4106 | return true; |
| 4107 | } |
| 4108 | |
| 4109 | // |
| 4110 | // API used internally with mtmd |
nothing calls this directly
no test coverage detected