ultrahdr: revert gain map image dimension calculation
Gain map resolution is 1 / kMapDimensionScaleFactor of primary image. Before computing the gain map image res, the primary image res is aligned to kMapDimensionScaleFactor and divided. This would require p010 and 420 to have additional bytes at each row end during access or clamp the reads to width. Currently neither is present. Until this is handled, adjust gain map res computations to avoid oob reads. Bug: 294709120 Bug: 294320724 Test: ./ultrahdr_enc_fuzzer Change-Id: I65daa5ac49255a8976cf929a5bd0ffe3e47afb6d
Loading
Please register or sign in to comment