H7 Plus rotation_corr broken?

I’ve got some code that works fine on the H7 but not on the plus with the v3.6.2 and latest master build.
The rotation_corr fails even at QQVGA with a MemoryError: out of fast Frame Buffer Stack memory.

I can see between the boards that some blocks have moved to different ram.
#define OMV_FB_MEMORY AXI_SRAM => became DRAM
#define OMV_JPEG_MEMORY SRAM3 => became DRAM

But I can’t see how this would cause an issue because it all seems bigger.
The rotation_corr has fb_alloc in it, but I don’t see how that could fail given the size of frame_buffer.
Also I don’t see any changes to this function recently.

Any ideas?

import sensor, image

# Camera Init

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)

# Camera Defs
while(True):
    # Capture an image
    img = sensor.snapshot()
    img.rotation_corr(x_translation=1,y_translation=1)

My mistake, I see a heap allocation there umm_init_x which allocates on heap?
The heap size is the same between H7 and H7 Plus.


So the call is this:

apriltag.c:12328
void imlib_rotation_corr(image_t *img, float x_rotation, float y_rotation, float z_rotation,
                         float x_translation, float y_translation,
                         float zoom, float fov, float *corners)
{
  umm_init_x(8000); // 400 20 byte heap blocks...
  ...
}

To this function:

// Note OMV_UMM_BLOCK_SIZE is 16 on H7 and 256 on H7 plys

void umm_init_x( size_t size ) {
  // UMM_MALLOC_CFG_HEAP_SIZE = 8000
  uint32_t UMM_MALLOC_CFG_HEAP_SIZE = (size / sizeof(size_t)) * sizeof(size_t);
  // H7      if (8000 <  16*128= 2048) then fail.  (Success)
  // H7 plus if (8000 < 256*128=32768) then fail!  (*Failure*)
  if (UMM_MALLOC_CFG_HEAP_SIZE < (sizeof(umm_block) * 128)) fb_alloc_fail();
  ...
}

So what is a UMM and what is this actually doing?

Definitely a bug, can you add this on the github issue tracker.