    assert(cap.sizeInBytes() >= buf->len*4);
    uint8_t* dst = (uint8_t*)buf->addr;
    uint8_t* src = cap.bits();
  
    // 2x downsample + rgb to grayscale
    memset(dst, 128, buf->len);
    downsample(src, dst);
  
    vipc_server->send(buf, &extra);
  
 
</s> remove   assert(cap.sizeInBytes() >= buf->len*4);
 </s> add   assert(cap.sizeInBytes() >= buf->len); </s> remove   downsample(src, dst);
 </s> add   for (int i = 0; i < WIDTH * HEIGHT; i++) {
    dst[i] = src[i * 3];
  } </s> remove   // 2x downsample + rgb to grayscale
  downsample(src, dst);
 </s> add   // RGB to greyscale
  for (int i = 0; i < WIDTH * HEIGHT; i++) {
    dst[i] = src[i * 3];
  } </s> remove   // Choose a zoom level that matches the scale of zoom level 13 at latitude 80deg
  float scale_lat80 = get_meters_per_pixel(80, 13);
  float zoom = get_zoom_level_for_scale(position.first, scale_lat80);
 </s> add   // Choose a scale that ensures above 13 zoom level up to and above 75deg of lat
  float meters_per_pixel = 2;
  float zoom = get_zoom_level_for_scale(position.first, meters_per_pixel); </s> remove HEIGHT = WIDTH = 256
 </s> add HEIGHT = WIDTH = SIZE = 512
METERS_PER_PIXEL = 2
  // RGB to greyscale
    assert(cap.sizeInBytes() >= buf->len*4);
    uint8_t* dst = (uint8_t*)buf->addr;
    uint8_t* src = cap.bits();
  
  // RGB to greyscale
    memset(dst, 128, buf->len);
    downsample(src, dst);
  
    vipc_server->send(buf, &extra);
  
keep keep keep keep replace keep keep keep keep keep
 Navd map renderer: update to larger image (#26580)

* rerender 512

* rerender 512

* Removed unnecessary code

* rgb -> grayscale

* Add constants

Co-authored-by: mitchellgoffpc <mitchellgoffpc@gmail.com> 
selfdrive/navd/map_renderer.cc