)]}'
{
  "commit": "25a6d23f872f37c91a3df15b75e1a97f590d7c46",
  "tree": "b5290a54a1466dfecd4a733615bcebef808681f0",
  "parents": [
    "714beb91144ac58f3e055dce77f77daf822f4e8a"
  ],
  "author": {
    "name": "evilgensec",
    "email": "evil.gen.sec@gmail.com",
    "time": "Thu Aug 06 21:46:46 2026 +0545"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Aug 06 18:01:46 2026 +0200"
  },
  "message": "Honour the base image stride in the tone map early exit (#3316)\n\navifRGBImageApplyGainMap() has a fast path for the case where the gain map\ndoes not need to be applied and the pixel format matches. It copies the base\nimage in one memcpy sized from baseImage-\u003erowBytes, which assumes the source\nand destination strides are equal. That assumption was only checked by an\nassert(), so it disappears under NDEBUG.\n\nThe destination is normally allocated by avifRGBImageAllocatePixels(), which\nsets rowBytes to width * avifRGBImagePixelSize() with no padding, while\navif.h documents that an avifRGBImage rowBytes only has to be \"at least\n(-\u003ewidth * avifRGBImagePixelSize())\". A caller supplying a padded base image,\nwhich is what an Android Bitmap or a cropped GPU readback produces, therefore\nmakes the memcpy read and write rowBytes * height bytes into a buffer holding\nonly width * pixelSize * height.\n\nPromote the assert into the branch condition. When the strides differ the\nearly exit is skipped and control falls through to the existing per pixel\nloop, which already goes through avifGetRGBAPixel and avifSetRGBAPixel and so\nhonours both strides. There is no behaviour change when the strides are\nequal.\n\nAdd ToneMapTest.ToneMapRGBPaddedBaseStride covering a padded base stride. It\nbuilds its images in memory and needs no test data.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d87f96a8ba26932d84bc7d260cc082c0f98c8817",
      "old_mode": 33188,
      "old_path": "src/gainmap.c",
      "new_id": "60721caa64c24992d3c4c61d447bf5bbb42e3c44",
      "new_mode": 33188,
      "new_path": "src/gainmap.c"
    },
    {
      "type": "modify",
      "old_id": "399f1673c0a85a372ac5e7c30e2f10f9a43adddc",
      "old_mode": 33188,
      "old_path": "tests/gtest/avifgainmaptest.cc",
      "new_id": "d9aa4bb1decaad921b0e88d3a965a8fae522945b",
      "new_mode": 33188,
      "new_path": "tests/gtest/avifgainmaptest.cc"
    }
  ]
}
