diff --git a/configure.py b/configure.py index dd225dfa..2724a07f 100644 --- a/configure.py +++ b/configure.py @@ -1215,8 +1215,8 @@ config.libs = [ Object(Matching, "reschange/iqdec_resolution_change_a3.c"), Object(Matching, "reschange/idct_resolution_change_var.c"), - Object(NonMatching, "texturecvtr/Texture_MCUtoY8U8V8.c"), - Object(NonMatching, "texturecvtr/Texture_MCUtoRGB565.c"), + Object(Matching, "texturecvtr/Texture_MCUtoY8U8V8.c"), + Object(Matching, "texturecvtr/Texture_MCUtoRGB565.c"), Object(NonMatching, "texturecvtr/Texture_MCUtoRGBA8.c"), Object(Matching, "b65/iqdec_b65_frv32.c"), diff --git a/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.c b/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.c index f44fc403..a49dc482 100644 --- a/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.c +++ b/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.c @@ -14,7 +14,37 @@ static void TMCJPEGDEC_converterYUV444toRGB565edge(TMCCJPEGDecWork*, s32, s32); static void TMCJPEGDEC_converterYUV400toRGB565(TMCCJPEGDecWork*, s32, s32); static void TMCJPEGDEC_converterYUV400toRGB565edge(TMCCJPEGDecWork*, s32, s32); +#pragma push +#pragma optimization_level 1 s32 TMCJPEGDEC_set_converterRGB565(TMCCJPEGDecWork* work) { + u8 mode411; + u8* crBlock411; + u8* cbBlock411; + u8* fourthRow411; + u8* thirdRow411; + u8* secondRow411; + u8* firstRow411; + TMCConverterFunc* edgeConverter411; + TMCConverterFunc* converter411; + + u8 mode422; + u8* crBlock422; + u8* cbBlock422; + u8* secondRow422; + u8* firstRow422; + TMCConverterFunc* edgeConverter422; + TMCConverterFunc* converter422; + + u8 mode420; + u8* crBlock420; + u8* cbBlock420; + u8* fourthRow420; + u8* thirdRow420; + u8* secondRow420; + u8* firstRow420; + TMCConverterFunc* edgeConverter420; + TMCConverterFunc* converter420; + u8* buffer; s32 componentCount; TMCCJPEGDecState* state; @@ -25,97 +55,84 @@ s32 TMCJPEGDEC_set_converterRGB565(TMCCJPEGDecWork* work) { switch (componentCount) { case 0: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* thirdRow; - u8* fourthRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV411toRGB565; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV411toRGB565edge; - secondRow = firstRow + mode; - thirdRow = secondRow + mode; - fourthRow = thirdRow + mode; - cbBlock = buffer + 260; - crBlock = buffer + 324; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[2] = thirdRow; - work->pConvRowPtrs[3] = fourthRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode411 = work->idctMode; + firstRow411 = buffer + 4; + converter411 = TMCJPEGDEC_converterYUV411toRGB565; + edgeConverter411 = TMCJPEGDEC_converterYUV411toRGB565edge; + secondRow411 = firstRow411 + mode411; + thirdRow411 = secondRow411 + mode411; + fourthRow411 = thirdRow411 + mode411; + cbBlock411 = buffer + 260; + crBlock411 = buffer + 324; + work->pConverterFunc = converter411; + work->pConverterFuncEdge = edgeConverter411; + work->pConvRowPtrs[0] = firstRow411; + work->pConvRowPtrs[1] = secondRow411; + work->pConvRowPtrs[2] = thirdRow411; + work->pConvRowPtrs[3] = fourthRow411; + work->pConvRowPtrs[5] = cbBlock411; + work->pConvRowPtrs[6] = crBlock411; work->pitch = 32; work->converterFlags = 0; break; } case 1: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV422toRGB565; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV422toRGB565edge; - secondRow = firstRow + mode; - cbBlock = buffer + 132; - crBlock = buffer + 196; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode422 = work->idctMode; + firstRow422 = buffer + 4; + converter422 = TMCJPEGDEC_converterYUV422toRGB565; + edgeConverter422 = TMCJPEGDEC_converterYUV422toRGB565edge; + secondRow422 = firstRow422 + mode422; + cbBlock422 = buffer + 132; + crBlock422 = buffer + 196; + work->pConverterFunc = converter422; + work->pConverterFuncEdge = edgeConverter422; + work->pConvRowPtrs[0] = firstRow422; + work->pConvRowPtrs[1] = secondRow422; + work->pConvRowPtrs[5] = cbBlock422; + work->pConvRowPtrs[6] = crBlock422; work->pitch = 16; work->converterFlags = 0; break; } case 2: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* thirdRow; - u8* fourthRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV420toRGB565; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV420toRGB565edge; - secondRow = firstRow + mode; - thirdRow = firstRow + mode * 16; - fourthRow = thirdRow + mode; - cbBlock = buffer + 260; - crBlock = buffer + 324; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[2] = thirdRow; - work->pConvRowPtrs[3] = fourthRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode420 = work->idctMode; + firstRow420 = buffer + 4; + converter420 = TMCJPEGDEC_converterYUV420toRGB565; + edgeConverter420 = TMCJPEGDEC_converterYUV420toRGB565edge; + secondRow420 = firstRow420 + mode420; + thirdRow420 = firstRow420 + mode420 * 16; + fourthRow420 = thirdRow420 + mode420; + cbBlock420 = buffer + 260; + crBlock420 = buffer + 324; + work->pConverterFunc = converter420; + work->pConverterFuncEdge = edgeConverter420; + work->pConvRowPtrs[0] = firstRow420; + work->pConvRowPtrs[1] = secondRow420; + work->pConvRowPtrs[2] = thirdRow420; + work->pConvRowPtrs[3] = fourthRow420; + work->pConvRowPtrs[5] = cbBlock420; + work->pConvRowPtrs[6] = crBlock420; work->pitch = 16; work->converterFlags = 0; break; } case 3: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* cbBlock; + u32 mode; u8* crBlock; - + u8* cbBlock; + u8* secondRow; + u8* firstRow; + TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; mode = work->idctMode; firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV211toRGB565; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV211toRGB565edge; + converter = TMCJPEGDEC_converterYUV211toRGB565; + edgeConverter = TMCJPEGDEC_converterYUV211toRGB565edge; secondRow = firstRow + mode * 8; cbBlock = buffer + 132; crBlock = buffer + 196; + work->pConverterFunc = converter; + work->pConverterFuncEdge = edgeConverter; work->pConvRowPtrs[0] = firstRow; work->pConvRowPtrs[1] = secondRow; work->pConvRowPtrs[5] = cbBlock; @@ -125,27 +142,27 @@ s32 TMCJPEGDEC_set_converterRGB565(TMCCJPEGDecWork* work) { break; } case 4: { - TMCConverterFunc* converter; TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; converter = TMCJPEGDEC_converterYUV444toRGB565; edgeConverter = TMCJPEGDEC_converterYUV444toRGB565edge; + work->pConverterFunc = converter; + work->pConverterFuncEdge = edgeConverter; work->pConvRowPtrs[0] = buffer + 4; work->pConvRowPtrs[5] = buffer + 0x44; work->pConvRowPtrs[6] = buffer + 0x84; - work->pConverterFunc = converter; - work->pConverterFuncEdge = edgeConverter; work->pitch = 0x08; work->converterFlags = 0; break; } case 5: { - TMCConverterFunc* converter; TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; converter = TMCJPEGDEC_converterYUV400toRGB565; edgeConverter = TMCJPEGDEC_converterYUV400toRGB565edge; - work->pConvRowPtrs[0] = buffer + 4; work->pConverterFunc = converter; work->pConverterFuncEdge = edgeConverter; + work->pConvRowPtrs[0] = buffer + 4; work->pitch = 0x08; work->converterFlags = 0; break; @@ -158,13 +175,19 @@ s32 TMCJPEGDEC_set_converterRGB565(TMCCJPEGDecWork* work) { { s32 width = state->jpegWidth; s32 height = state->jpegHeight; - state->convWidth = ((u32)width / 4 + (width % 4 != 0)) * 4; - state->convHeight = ((u32)height / 4 + (height % 4 != 0)) * 4; + s32 roundedWidth; + s32 heightPadding; + roundedWidth = (u32)width / 4 + (width % 4 != 0); + heightPadding = height % 4 != 0; + state->convWidth = roundedWidth * 4; + state->convHeight = ((u32)height / 4 + heightPadding) * 4; } return 0; } +#pragma pop + static void TMCJPEGDEC_converterYUV411toRGB565(TMCCJPEGDecWork* work, s32 x, s32 y) { s32 tileColumn; s32 red; diff --git a/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.c b/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.c index a96ff3e1..6fd3610b 100644 --- a/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.c +++ b/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.c @@ -14,7 +14,37 @@ static void TMCJPEGDEC_converterYUV444toRGBA8edge(TMCCJPEGDecWork*, s32, s32); static void TMCJPEGDEC_converterYUV400toRGBA8(TMCCJPEGDecWork*, s32, s32); static void TMCJPEGDEC_converterYUV400toRGBA8edge(TMCCJPEGDecWork*, s32, s32); +#pragma push +#pragma optimization_level 1 s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) { + u8 mode411; + u8* crBlock411; + u8* cbBlock411; + u8* fourthRow411; + u8* thirdRow411; + u8* secondRow411; + u8* firstRow411; + TMCConverterFunc* edgeConverter411; + TMCConverterFunc* converter411; + + u8 mode422; + u8* crBlock422; + u8* cbBlock422; + u8* secondRow422; + u8* firstRow422; + TMCConverterFunc* edgeConverter422; + TMCConverterFunc* converter422; + + u8 mode420; + u8* crBlock420; + u8* cbBlock420; + u8* fourthRow420; + u8* thirdRow420; + u8* secondRow420; + u8* firstRow420; + TMCConverterFunc* edgeConverter420; + TMCConverterFunc* converter420; + u8* buffer; s32 componentCount; TMCCJPEGDecState* state; @@ -25,97 +55,84 @@ s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) { switch (componentCount) { case 0: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* thirdRow; - u8* fourthRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV411toRGBA8; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV411toRGBA8edge; - secondRow = firstRow + mode; - thirdRow = secondRow + mode; - fourthRow = thirdRow + mode; - cbBlock = buffer + 260; - crBlock = buffer + 324; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[2] = thirdRow; - work->pConvRowPtrs[3] = fourthRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode411 = work->idctMode; + firstRow411 = buffer + 4; + converter411 = TMCJPEGDEC_converterYUV411toRGBA8; + edgeConverter411 = TMCJPEGDEC_converterYUV411toRGBA8edge; + secondRow411 = firstRow411 + mode411; + thirdRow411 = secondRow411 + mode411; + fourthRow411 = thirdRow411 + mode411; + cbBlock411 = buffer + 260; + crBlock411 = buffer + 324; + work->pConverterFunc = converter411; + work->pConverterFuncEdge = edgeConverter411; + work->pConvRowPtrs[0] = firstRow411; + work->pConvRowPtrs[1] = secondRow411; + work->pConvRowPtrs[2] = thirdRow411; + work->pConvRowPtrs[3] = fourthRow411; + work->pConvRowPtrs[5] = cbBlock411; + work->pConvRowPtrs[6] = crBlock411; work->pitch = 32; work->converterFlags = 0; break; } case 1: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV422toRGBA8; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV422toRGBA8edge; - secondRow = firstRow + mode; - cbBlock = buffer + 132; - crBlock = buffer + 196; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode422 = work->idctMode; + firstRow422 = buffer + 4; + converter422 = TMCJPEGDEC_converterYUV422toRGBA8; + edgeConverter422 = TMCJPEGDEC_converterYUV422toRGBA8edge; + secondRow422 = firstRow422 + mode422; + cbBlock422 = buffer + 132; + crBlock422 = buffer + 196; + work->pConverterFunc = converter422; + work->pConverterFuncEdge = edgeConverter422; + work->pConvRowPtrs[0] = firstRow422; + work->pConvRowPtrs[1] = secondRow422; + work->pConvRowPtrs[5] = cbBlock422; + work->pConvRowPtrs[6] = crBlock422; work->pitch = 16; work->converterFlags = 0; break; } case 2: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* thirdRow; - u8* fourthRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV420toRGBA8; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV420toRGBA8edge; - secondRow = firstRow + mode; - thirdRow = firstRow + mode * 16; - fourthRow = thirdRow + mode; - cbBlock = buffer + 260; - crBlock = buffer + 324; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[2] = thirdRow; - work->pConvRowPtrs[3] = fourthRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode420 = work->idctMode; + firstRow420 = buffer + 4; + converter420 = TMCJPEGDEC_converterYUV420toRGBA8; + edgeConverter420 = TMCJPEGDEC_converterYUV420toRGBA8edge; + secondRow420 = firstRow420 + mode420; + thirdRow420 = firstRow420 + mode420 * 16; + fourthRow420 = thirdRow420 + mode420; + cbBlock420 = buffer + 260; + crBlock420 = buffer + 324; + work->pConverterFunc = converter420; + work->pConverterFuncEdge = edgeConverter420; + work->pConvRowPtrs[0] = firstRow420; + work->pConvRowPtrs[1] = secondRow420; + work->pConvRowPtrs[2] = thirdRow420; + work->pConvRowPtrs[3] = fourthRow420; + work->pConvRowPtrs[5] = cbBlock420; + work->pConvRowPtrs[6] = crBlock420; work->pitch = 16; work->converterFlags = 0; break; } case 3: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* cbBlock; + u32 mode; u8* crBlock; - + u8* cbBlock; + u8* secondRow; + u8* firstRow; + TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; mode = work->idctMode; firstRow = buffer + 4; - work->pConverterFunc = TMCJPEGDEC_converterYUV211toRGBA8; - work->pConverterFuncEdge = TMCJPEGDEC_converterYUV211toRGBA8edge; + converter = TMCJPEGDEC_converterYUV211toRGBA8; + edgeConverter = TMCJPEGDEC_converterYUV211toRGBA8edge; secondRow = firstRow + mode * 8; cbBlock = buffer + 132; crBlock = buffer + 196; + work->pConverterFunc = converter; + work->pConverterFuncEdge = edgeConverter; work->pConvRowPtrs[0] = firstRow; work->pConvRowPtrs[1] = secondRow; work->pConvRowPtrs[5] = cbBlock; @@ -125,27 +142,27 @@ s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) { break; } case 4: { - TMCConverterFunc* converter; TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; converter = TMCJPEGDEC_converterYUV444toRGBA8; edgeConverter = TMCJPEGDEC_converterYUV444toRGBA8edge; + work->pConverterFunc = converter; + work->pConverterFuncEdge = edgeConverter; work->pConvRowPtrs[0] = buffer + 4; work->pConvRowPtrs[5] = buffer + 0x44; work->pConvRowPtrs[6] = buffer + 0x84; - work->pConverterFunc = converter; - work->pConverterFuncEdge = edgeConverter; work->pitch = 0x08; work->converterFlags = 0; break; } case 5: { - TMCConverterFunc* converter; TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; converter = TMCJPEGDEC_converterYUV400toRGBA8; edgeConverter = TMCJPEGDEC_converterYUV400toRGBA8edge; - work->pConvRowPtrs[0] = buffer + 4; work->pConverterFunc = converter; work->pConverterFuncEdge = edgeConverter; + work->pConvRowPtrs[0] = buffer + 4; work->pitch = 0x08; work->converterFlags = 0; break; @@ -158,13 +175,19 @@ s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) { { s32 width = state->jpegWidth; s32 height = state->jpegHeight; - state->convWidth = ((u32)width / 4 + (width % 4 != 0)) * 4; - state->convHeight = ((u32)height / 4 + (height % 4 != 0)) * 4; + s32 roundedWidth; + s32 heightPadding; + roundedWidth = (u32)width / 4 + (width % 4 != 0); + heightPadding = height % 4 != 0; + state->convWidth = roundedWidth * 4; + state->convHeight = ((u32)height / 4 + heightPadding) * 4; } return 0; } +#pragma pop + static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) { s32 red; u8* luminance; diff --git a/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.c b/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.c index 0ebebd2a..187888b6 100644 --- a/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.c +++ b/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.c @@ -14,7 +14,37 @@ static void TMCJPEG_814F32E4(TMCCJPEGDecWork*, s32, s32); static void TMCJPEG_814F34A4(TMCCJPEGDecWork*, s32, s32); static void TMCJPEG_814F372C(TMCCJPEGDecWork*, s32, s32); +#pragma push +#pragma optimization_level 1 s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) { + u8 mode411; + u8* crBlock411; + u8* cbBlock411; + u8* fourthRow411; + u8* thirdRow411; + u8* secondRow411; + u8* firstRow411; + TMCConverterFunc* edgeConverter411; + TMCConverterFunc* converter411; + + u8 mode422; + u8* crBlock422; + u8* cbBlock422; + u8* secondRow422; + u8* firstRow422; + TMCConverterFunc* edgeConverter422; + TMCConverterFunc* converter422; + + u8 mode420; + u8* crBlock420; + u8* cbBlock420; + u8* fourthRow420; + u8* thirdRow420; + u8* secondRow420; + u8* firstRow420; + TMCConverterFunc* edgeConverter420; + TMCConverterFunc* converter420; + u8* buffer; s32 componentCount; TMCCJPEGDecState* state; @@ -25,97 +55,84 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) { switch (componentCount) { case 0: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* thirdRow; - u8* fourthRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEG_814EFEAC; - work->pConverterFuncEdge = TMCJPEG_814F043C; - secondRow = firstRow + mode; - thirdRow = secondRow + mode; - fourthRow = thirdRow + mode; - cbBlock = buffer + 260; - crBlock = buffer + 324; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[2] = thirdRow; - work->pConvRowPtrs[3] = fourthRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode411 = work->idctMode; + firstRow411 = buffer + 4; + converter411 = TMCJPEG_814EFEAC; + edgeConverter411 = TMCJPEG_814F043C; + secondRow411 = firstRow411 + mode411; + thirdRow411 = secondRow411 + mode411; + fourthRow411 = thirdRow411 + mode411; + cbBlock411 = buffer + 260; + crBlock411 = buffer + 324; + work->pConverterFunc = converter411; + work->pConverterFuncEdge = edgeConverter411; + work->pConvRowPtrs[0] = firstRow411; + work->pConvRowPtrs[1] = secondRow411; + work->pConvRowPtrs[2] = thirdRow411; + work->pConvRowPtrs[3] = fourthRow411; + work->pConvRowPtrs[5] = cbBlock411; + work->pConvRowPtrs[6] = crBlock411; work->pitch = 32; work->converterFlags = 0; break; } case 1: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEG_814F0A58; - work->pConverterFuncEdge = TMCJPEG_814F11C4; - secondRow = firstRow + mode; - cbBlock = buffer + 132; - crBlock = buffer + 196; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode422 = work->idctMode; + firstRow422 = buffer + 4; + converter422 = TMCJPEG_814F0A58; + edgeConverter422 = TMCJPEG_814F11C4; + secondRow422 = firstRow422 + mode422; + cbBlock422 = buffer + 132; + crBlock422 = buffer + 196; + work->pConverterFunc = converter422; + work->pConverterFuncEdge = edgeConverter422; + work->pConvRowPtrs[0] = firstRow422; + work->pConvRowPtrs[1] = secondRow422; + work->pConvRowPtrs[5] = cbBlock422; + work->pConvRowPtrs[6] = crBlock422; work->pitch = 16; work->converterFlags = 0; break; } case 2: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* thirdRow; - u8* fourthRow; - u8* cbBlock; - u8* crBlock; - - mode = work->idctMode; - firstRow = buffer + 4; - work->pConverterFunc = TMCJPEG_814F17E0; - work->pConverterFuncEdge = TMCJPEG_814F1F48; - secondRow = firstRow + mode; - thirdRow = firstRow + mode * 16; - fourthRow = thirdRow + mode; - cbBlock = buffer + 260; - crBlock = buffer + 324; - work->pConvRowPtrs[0] = firstRow; - work->pConvRowPtrs[1] = secondRow; - work->pConvRowPtrs[2] = thirdRow; - work->pConvRowPtrs[3] = fourthRow; - work->pConvRowPtrs[5] = cbBlock; - work->pConvRowPtrs[6] = crBlock; + mode420 = work->idctMode; + firstRow420 = buffer + 4; + converter420 = TMCJPEG_814F17E0; + edgeConverter420 = TMCJPEG_814F1F48; + secondRow420 = firstRow420 + mode420; + thirdRow420 = firstRow420 + mode420 * 16; + fourthRow420 = thirdRow420 + mode420; + cbBlock420 = buffer + 260; + crBlock420 = buffer + 324; + work->pConverterFunc = converter420; + work->pConverterFuncEdge = edgeConverter420; + work->pConvRowPtrs[0] = firstRow420; + work->pConvRowPtrs[1] = secondRow420; + work->pConvRowPtrs[2] = thirdRow420; + work->pConvRowPtrs[3] = fourthRow420; + work->pConvRowPtrs[5] = cbBlock420; + work->pConvRowPtrs[6] = crBlock420; work->pitch = 16; work->converterFlags = 0; break; } case 3: { - u8 mode; - u8* firstRow; - u8* secondRow; - u8* cbBlock; + u32 mode; u8* crBlock; - + u8* cbBlock; + u8* secondRow; + u8* firstRow; + TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; mode = work->idctMode; firstRow = buffer + 4; - work->pConverterFunc = TMCJPEG_814F2570; - work->pConverterFuncEdge = TMCJPEG_814F2B50; + converter = TMCJPEG_814F2570; + edgeConverter = TMCJPEG_814F2B50; secondRow = firstRow + mode * 8; cbBlock = buffer + 132; crBlock = buffer + 196; + work->pConverterFunc = converter; + work->pConverterFuncEdge = edgeConverter; work->pConvRowPtrs[0] = firstRow; work->pConvRowPtrs[1] = secondRow; work->pConvRowPtrs[5] = cbBlock; @@ -125,27 +142,27 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) { break; } case 4: { - TMCConverterFunc* converter; TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; converter = TMCJPEG_814F3158; edgeConverter = TMCJPEG_814F32E4; + work->pConverterFunc = converter; + work->pConverterFuncEdge = edgeConverter; work->pConvRowPtrs[0] = buffer + 4; work->pConvRowPtrs[5] = buffer + 0x44; work->pConvRowPtrs[6] = buffer + 0x84; - work->pConverterFunc = converter; - work->pConverterFuncEdge = edgeConverter; work->pitch = 0x08; work->converterFlags = 0; break; } case 5: { - TMCConverterFunc* converter; TMCConverterFunc* edgeConverter; + TMCConverterFunc* converter; converter = TMCJPEG_814F34A4; edgeConverter = TMCJPEG_814F372C; - work->pConvRowPtrs[0] = buffer + 4; work->pConverterFunc = converter; work->pConverterFuncEdge = edgeConverter; + work->pConvRowPtrs[0] = buffer + 4; work->pitch = 0x08; work->converterFlags = 0; break; @@ -158,16 +175,25 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) { { s32 width = state->jpegWidth; s32 height = state->jpegHeight; - state->convWidth = ((u32)width / 8 + (width % 8 != 0)) * 8; - state->convHeight = ((u32)height / 4 + (height % 4 != 0)) * 4; + s32 roundedWidth; + s32 heightPadding; + + roundedWidth = (u32)width / 8 + (width % 8 != 0); + heightPadding = height % 4 != 0; + state->convWidth = roundedWidth * 8; + state->convHeight = ((u32)height / 4 + heightPadding) * 4; width = state->outputWidth; height = state->outputHeight; - state->chromaWidth = ((u32)width / 8 + (width % 8 != 0)) * 8; - state->chromaHeight = ((u32)height / 4 + (height % 4 != 0)) * 4; + roundedWidth = (u32)width / 8 + (width % 8 != 0); + heightPadding = height % 4 != 0; + state->chromaWidth = roundedWidth * 8; + state->chromaHeight = ((u32)height / 4 + heightPadding) * 4; } return 0; } +#pragma pop + static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) { s32 rowSkip; u8* output; diff --git a/tools/decomp-assist/sol-x7.attempts.md b/tools/decomp-assist/sol-x7.attempts.md new file mode 100644 index 00000000..3a5bb9cc --- /dev/null +++ b/tools/decomp-assist/sol-x7.attempts.md @@ -0,0 +1,497 @@ +# sol-x7 attempts + +Baseline 9321a926, branch agent/w1008/data-d9. Read sol-common, brief-v2, all levers, prior sol-tex rounds, owned historical attempt logs, unslop and writing-for-agents. No remote writes or other-worktree edits. + +- {"trial": "baseline-RGB565", "unit": "RGB565", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 12} +- {"trial": "baseline-RGBA8", "unit": "RGBA8", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 11} +- {"trial": "baseline-Y8U8V8", "unit": "Y8U8V8", "diffs": 195, "insns": [195, 196], "base": false, "score": 92.78571, "exact": 12} +- {"trial": "RGB565-plane-sizes-s32", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-plane-sizes-u32", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-plane-sizes-u16", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-plane-sizes-u8", "unit": "RGB565", "diffs": 170, "insns": [163, 170], "base": false, "score": 86.98235, "exact": 12} +- {"trial": "RGB565-layout-outer-u32", "unit": "RGB565", "error": "compile"} +- {"trial": "RGB565-layout-outer-u8", "unit": "RGB565", "error": "compile"} +- {"trial": "RGB565-layout-case-u32", "unit": "RGB565", "error": "compile"} +- {"trial": "RGB565-layout-case-u8", "unit": "RGB565", "error": "compile"} +- {"trial": "RGBA8-plane-sizes-s32", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-plane-sizes-u32", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-plane-sizes-u16", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-plane-sizes-u8", "unit": "RGBA8", "diffs": 170, "insns": [163, 170], "base": false, "score": 86.98235, "exact": 11} +- {"trial": "RGBA8-layout-outer-u32", "unit": "RGBA8", "error": "compile"} +- {"trial": "RGBA8-layout-outer-u8", "unit": "RGBA8", "error": "compile"} +- {"trial": "RGBA8-layout-case-u32", "unit": "RGBA8", "error": "compile"} +- {"trial": "RGBA8-layout-case-u8", "unit": "RGBA8", "error": "compile"} +- {"trial": "Y8U8V8-plane-sizes-s32", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-plane-sizes-u32", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-plane-sizes-u16", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-plane-sizes-u8", "unit": "Y8U8V8", "diffs": 196, "insns": [189, 196], "base": false, "score": 87.10714, "exact": 12} +- {"trial": "Y8U8V8-layout-outer-u32", "unit": "Y8U8V8", "error": "compile"} +- {"trial": "Y8U8V8-layout-outer-u8", "unit": "Y8U8V8", "error": "compile"} +- {"trial": "Y8U8V8-layout-case-u32", "unit": "Y8U8V8", "error": "compile"} +- {"trial": "Y8U8V8-layout-case-u8", "unit": "Y8U8V8", "error": "compile"} +- {"trial": "baseline-RGB565", "unit": "RGB565", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 12} +- {"trial": "baseline-RGBA8", "unit": "RGBA8", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 11} +- {"trial": "baseline-Y8U8V8", "unit": "Y8U8V8", "diffs": 195, "insns": [195, 196], "base": false, "score": 92.78571, "exact": 12} +- {"trial": "RGB565-plane-sizes-s32", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-plane-sizes-u32", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-plane-sizes-u16", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-layout-fixed-outer-u32", "unit": "RGB565", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 12} +- {"trial": "RGB565-layout-fixed-outer-u8", "unit": "RGB565", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 12} +- {"trial": "RGB565-layout-fixed-case-u32", "unit": "RGB565", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 12} +- {"trial": "RGB565-layout-fixed-case-u8", "unit": "RGB565", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 12} +- {"trial": "RGBA8-plane-sizes-s32", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-plane-sizes-u32", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-plane-sizes-u16", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-layout-fixed-outer-u32", "unit": "RGBA8", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 11} +- {"trial": "RGBA8-layout-fixed-outer-u8", "unit": "RGBA8", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 11} +- {"trial": "RGBA8-layout-fixed-case-u32", "unit": "RGBA8", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 11} +- {"trial": "RGBA8-layout-fixed-case-u8", "unit": "RGBA8", "diffs": 169, "insns": [169, 170], "base": false, "score": 93.91765, "exact": 11} +- {"trial": "Y8U8V8-plane-sizes-s32", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-plane-sizes-u32", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-plane-sizes-u16", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-layout-fixed-outer-u32", "unit": "Y8U8V8", "diffs": 195, "insns": [195, 196], "base": false, "score": 92.78571, "exact": 12} +- {"trial": "Y8U8V8-layout-fixed-outer-u8", "unit": "Y8U8V8", "diffs": 195, "insns": [195, 196], "base": false, "score": 92.78571, "exact": 12} +- {"trial": "Y8U8V8-layout-fixed-case-u32", "unit": "Y8U8V8", "diffs": 195, "insns": [195, 196], "base": false, "score": 92.78571, "exact": 12} +- {"trial": "Y8U8V8-layout-fixed-case-u8", "unit": "Y8U8V8", "diffs": 195, "insns": [195, 196], "base": false, "score": 92.78571, "exact": 12} +- {"trial": "RGB565-pre-size-conditional-False", "unit": "RGB565", "diffs": 191, "insns": [195, 170], "base": false, "score": 69.6647, "exact": 12} +- {"trial": "RGB565-pre-size-conditional-True", "unit": "RGB565", "diffs": 187, "insns": [191, 170], "base": false, "score": 73.55882, "exact": 12} +- {"trial": "RGB565-pre-size-if-False", "unit": "RGB565", "diffs": 182, "insns": [188, 170], "base": false, "score": 74.752945, "exact": 12} +- {"trial": "RGB565-pre-size-if-True", "unit": "RGB565", "diffs": 182, "insns": [184, 170], "base": false, "score": 74.935295, "exact": 12} +- {"trial": "RGB565-pre-size-switch-False", "unit": "RGB565", "diffs": 188, "insns": [190, 170], "base": false, "score": 74.858826, "exact": 12} +- {"trial": "RGB565-pre-size-switch-True", "unit": "RGB565", "diffs": 184, "insns": [186, 170], "base": false, "score": 75.94118, "exact": 12} +- {"trial": "RGB565-pre-size-shift-False", "unit": "RGB565", "diffs": 178, "insns": [179, 170], "base": false, "score": 73.62353, "exact": 12} +- {"trial": "RGB565-pre-size-shift-True", "unit": "RGB565", "diffs": 174, "insns": [175, 170], "base": false, "score": 73.958824, "exact": 12} +- {"trial": "RGB565-plane-helper-False-False", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 12} +- {"trial": "RGB565-plane-helper-False-True", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 12} +- {"trial": "RGB565-plane-helper-True-False", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 12} +- {"trial": "RGB565-plane-helper-True-True", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 12} +- {"trial": "RGBA8-pre-size-conditional-False", "unit": "RGBA8", "diffs": 191, "insns": [195, 170], "base": false, "score": 69.6647, "exact": 11} +- {"trial": "RGBA8-pre-size-conditional-True", "unit": "RGBA8", "diffs": 187, "insns": [191, 170], "base": false, "score": 73.55882, "exact": 11} +- {"trial": "RGBA8-pre-size-if-False", "unit": "RGBA8", "diffs": 182, "insns": [188, 170], "base": false, "score": 74.752945, "exact": 11} +- {"trial": "RGBA8-pre-size-if-True", "unit": "RGBA8", "diffs": 182, "insns": [184, 170], "base": false, "score": 74.935295, "exact": 11} +- {"trial": "RGBA8-pre-size-switch-False", "unit": "RGBA8", "diffs": 188, "insns": [190, 170], "base": false, "score": 74.858826, "exact": 11} +- {"trial": "RGBA8-pre-size-switch-True", "unit": "RGBA8", "diffs": 184, "insns": [186, 170], "base": false, "score": 75.94118, "exact": 11} +- {"trial": "RGBA8-pre-size-shift-False", "unit": "RGBA8", "diffs": 178, "insns": [179, 170], "base": false, "score": 73.62353, "exact": 11} +- {"trial": "RGBA8-pre-size-shift-True", "unit": "RGBA8", "diffs": 174, "insns": [175, 170], "base": false, "score": 73.958824, "exact": 11} +- {"trial": "RGBA8-plane-helper-False-False", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 11} +- {"trial": "RGBA8-plane-helper-False-True", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 11} +- {"trial": "RGBA8-plane-helper-True-False", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 11} +- {"trial": "RGBA8-plane-helper-True-True", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.59412, "exact": 11} +- {"trial": "Y8U8V8-pre-size-conditional-False", "unit": "Y8U8V8", "diffs": 217, "insns": [221, 196], "base": false, "score": 74.04592, "exact": 12} +- {"trial": "Y8U8V8-pre-size-conditional-True", "unit": "Y8U8V8", "diffs": 213, "insns": [217, 196], "base": false, "score": 69.755104, "exact": 12} +- {"trial": "Y8U8V8-pre-size-if-False", "unit": "Y8U8V8", "diffs": 208, "insns": [214, 196], "base": false, "score": 74.561226, "exact": 12} +- {"trial": "Y8U8V8-pre-size-if-True", "unit": "Y8U8V8", "diffs": 208, "insns": [210, 196], "base": false, "score": 76.79592, "exact": 12} +- {"trial": "Y8U8V8-pre-size-switch-False", "unit": "Y8U8V8", "diffs": 214, "insns": [216, 196], "base": false, "score": 74.65306, "exact": 12} +- {"trial": "Y8U8V8-pre-size-switch-True", "unit": "Y8U8V8", "diffs": 210, "insns": [212, 196], "base": false, "score": 78.28571, "exact": 12} +- {"trial": "Y8U8V8-pre-size-shift-False", "unit": "Y8U8V8", "diffs": 204, "insns": [205, 196], "base": false, "score": 73.34694, "exact": 12} +- {"trial": "Y8U8V8-pre-size-shift-True", "unit": "Y8U8V8", "diffs": 200, "insns": [201, 196], "base": false, "score": 72.46939, "exact": 12} +- {"trial": "Y8U8V8-plane-helper-False-False", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.744896, "exact": 12} +- {"trial": "Y8U8V8-plane-helper-False-True", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.744896, "exact": 12} +- {"trial": "Y8U8V8-plane-helper-True-False", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.744896, "exact": 12} +- {"trial": "Y8U8V8-plane-helper-True-True", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.744896, "exact": 12} +- {"trial": "rgba411-baseline", "unit": "RGBA8", "diffs": 153, "insns": [242, 242], "base": false, "score": 82.70661, "exact": 11} +- {"trial": "rgba411-all-expression", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.78925, "exact": 11} +- {"trial": "rgba411-all-assign", "unit": "RGBA8", "diffs": 165, "insns": [242, 242], "base": false, "score": 77.694214, "exact": 11} +- {"trial": "rgba411-all-locals", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.78925, "exact": 11} +- {"trial": "rgba411-greenblue-expression", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.78925, "exact": 11} +- {"trial": "rgba411-greenblue-assign", "unit": "RGBA8", "diffs": 171, "insns": [242, 242], "base": false, "score": 76.75207, "exact": 11} +- {"trial": "rgba411-greenblue-locals", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.78925, "exact": 11} +- {"trial": "rgba411-red-expression", "unit": "RGBA8", "diffs": 160, "insns": [242, 242], "base": false, "score": 82.119835, "exact": 11} +- {"trial": "rgba411-red-assign", "unit": "RGBA8", "diffs": 150, "insns": [242, 242], "base": false, "score": 79.11157, "exact": 11} +- {"trial": "rgba411-red-locals", "unit": "RGBA8", "diffs": 160, "insns": [242, 242], "base": false, "score": 82.119835, "exact": 11} +- {"trial": "rgba411-middle-expression", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.78925, "exact": 11} +- {"trial": "rgba411-middle-assign", "unit": "RGBA8", "diffs": 165, "insns": [242, 242], "base": false, "score": 80.71075, "exact": 11} +- {"trial": "rgba411-middle-locals", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.78925, "exact": 11} +- {"trial": "rgba411-edges-expression", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.83058, "exact": 11} +- {"trial": "rgba411-edges-assign", "unit": "RGBA8", "diffs": 157, "insns": [242, 242], "base": false, "score": 77.96281, "exact": 11} +- {"trial": "rgba411-edges-locals", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 79.83058, "exact": 11} +- {"trial": "rgba411-index-single-after", "unit": "RGBA8", "diffs": 161, "insns": [242, 242], "base": false, "score": 80.29752, "exact": 11} +- {"trial": "rgba411-index-single-before", "unit": "RGBA8", "diffs": 226, "insns": [245, 242], "base": false, "score": 74.24793, "exact": 11} +- {"trial": "rgba411-index-perpixel-after", "unit": "RGBA8", "diffs": 159, "insns": [242, 242], "base": false, "score": 78.90496, "exact": 11} +- {"trial": "rgba411-index-perpixel-before", "unit": "RGBA8", "diffs": 226, "insns": [245, 242], "base": false, "score": 73.86777, "exact": 11} +- {"trial": "RGB565-stride-size-pitch-False-early", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 12} +- {"trial": "RGB565-stride-size-pitch-False-late", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 12} +- {"trial": "RGB565-stride-size-pitch-True-early", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 12} +- {"trial": "RGB565-stride-size-pitch-True-late", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 12} +- {"trial": "RGB565-stride-size-localPitch-False-early", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 12} +- {"trial": "RGB565-stride-size-localPitch-False-late", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-stride-size-localPitch-True-early", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 12} +- {"trial": "RGB565-stride-size-localPitch-True-late", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-stride-size-rowSpan-False-early", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 12} +- {"trial": "RGB565-stride-size-rowSpan-False-late", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGB565-stride-size-rowSpan-True-early", "unit": "RGB565", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 12} +- {"trial": "RGB565-stride-size-rowSpan-True-late", "unit": "RGB565", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 12} +- {"trial": "RGBA8-stride-size-pitch-False-early", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 11} +- {"trial": "RGBA8-stride-size-pitch-False-late", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 11} +- {"trial": "RGBA8-stride-size-pitch-True-early", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 11} +- {"trial": "RGBA8-stride-size-pitch-True-late", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 79.87059, "exact": 11} +- {"trial": "RGBA8-stride-size-localPitch-False-early", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 11} +- {"trial": "RGBA8-stride-size-localPitch-False-late", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-stride-size-localPitch-True-early", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 11} +- {"trial": "RGBA8-stride-size-localPitch-True-late", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-stride-size-rowSpan-False-early", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 11} +- {"trial": "RGBA8-stride-size-rowSpan-False-late", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "RGBA8-stride-size-rowSpan-True-early", "unit": "RGBA8", "diffs": 167, "insns": [169, 170], "base": false, "score": 80.23529, "exact": 11} +- {"trial": "RGBA8-stride-size-rowSpan-True-late", "unit": "RGBA8", "diffs": 168, "insns": [169, 170], "base": false, "score": 85.71176, "exact": 11} +- {"trial": "Y8U8V8-stride-size-pitch-False-early", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-pitch-False-late", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-pitch-True-early", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-pitch-True-late", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-localPitch-False-early", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-localPitch-False-late", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-stride-size-localPitch-True-early", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-localPitch-True-late", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-stride-size-rowSpan-False-early", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-rowSpan-False-late", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "Y8U8V8-stride-size-rowSpan-True-early", "unit": "Y8U8V8", "diffs": 193, "insns": [195, 196], "base": false, "score": 80.22959, "exact": 12} +- {"trial": "Y8U8V8-stride-size-rowSpan-True-late", "unit": "Y8U8V8", "diffs": 194, "insns": [195, 196], "base": false, "score": 84.77041, "exact": 12} +- {"trial": "rgba411-pack-s32-outer-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-s32-outer-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-s32-group-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-s32-group-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-s32-pixel-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-s32-pixel-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-u32-outer-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-u32-outer-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-u32-group-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-u32-group-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-u32-pixel-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-u32-pixel-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-u16-outer-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-u16-outer-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-u16-group-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-u16-group-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-pack-u16-pixel-s32", "unit": "RGBA8", "diffs": 148, "insns": [242, 242], "base": false, "score": 80.17355, "exact": 11} +- {"trial": "rgba411-pack-u16-pixel-u8", "unit": "RGBA8", "diffs": 146, "insns": [242, 242], "base": false, "score": 81.82645, "exact": 11} +- {"trial": "rgba411-plane-indices-outer-s32", "unit": "RGBA8", "diffs": 153, "insns": [242, 242], "base": false, "score": 82.70661, "exact": 11} +- {"trial": "rgba411-plane-indices-outer-u32", "unit": "RGBA8", "diffs": 153, "insns": [242, 242], "base": false, "score": 82.70661, "exact": 11} +- {"trial": "rgba411-plane-indices-group-s32", "unit": "RGBA8", "diffs": 153, "insns": [242, 242], "base": false, "score": 82.70661, "exact": 11} +- {"trial": "rgba411-plane-indices-group-u32", "unit": "RGBA8", "diffs": 153, "insns": [242, 242], "base": false, "score": 82.70661, "exact": 11} +- {"trial": "rgba411-plane-indices-pixel-s32", "unit": "RGBA8", "diffs": 153, "insns": [242, 242], "base": false, "score": 82.70661, "exact": 11} +- {"trial": "rgba411-plane-indices-pixel-u32", "unit": "RGBA8", "diffs": 153, "insns": [242, 242], "base": false, "score": 82.70661, "exact": 11} + +## Source review and rejected diagnostics + +The initial u8 ySize probes truncated 256 to zero. Their results are invalid and excluded from best-source selection. Corrected sizes use s32/u32/u16. The first typed-layout probes placed typedefs before the type includes and failed to compile; the corrected probes put them after the includes. No failed or semantically invalid source is retained. + +All three setters were tested with per-mode ySize/cSize, actual header/Y/Cb/Cr layout types, pre-switch size selection through conditional/if/switch/shift forms, chroma-plane inline access, and plane sizes derived from the descriptor's pitch or a local row span. The case-local sizes and typed views still fold convBuf into work-relative addresses. Pre-switch size selection adds size-selection operations and still misses the target base. Deriving sizes from pitch changes scheduling and colors but retains 169/170 or 195/196 instructions with no prologue base. No new setter result improves the existing diagnostic saved by sol-tex. + +The other converter units use the byte-array field with literal plane offsets. decapi.c selects the converter functions but never accesses convBuf. Other C sources in this library do not access convBuf. No evidence supports a different shared field definition; the header remains unchanged. + +RGBA411 probes covered per-pixel color identities, separate alpha/GB packing with integer-width and scope variations, and explicit indices for both tiled output planes. Best positional result is 146/242, equal 968-byte size, but official fuzzy is 81.82645 versus 82.70661 baseline. It repeats the earlier packed-pixel diagnostic at the instruction level, so it is rejected. All exact siblings remained exact in the per-trial unit reports. None of these results is a match or a retained gain. + +Restored all owned sources before final verification. No source, header, configure.py, or inventory edit is retained. The queued first tracer was cancelled before it produced a capture, then relaunched with an immutable /tmp/sol-x7-rgba-snapshot.c so later source probes cannot race its compiler input. The debugger permits capture directories only under its own tool root; the first requested in-worktree output path was rejected before execution. + +## Allocator evidence + +Fresh immutable-source capture completed at `/mnt/drive2/projects/wii-ipl-workers/_mwdbg/runs/sol-x7-rgba-snapshot`. Its .text and relocations equal the freshly rebuilt normal source object. The only ELF differences are the STT_FILE basename and corresponding string-table indices in .symtab/.strtab; resolved symbol properties otherwise agree. No byte-identical whole-object claim is made. The earlier sol-tex-rgba411 capture also has the same 242-instruction function as the fresh source object. + +The current regsim reproduces 179/179 virtual registers for the fresh capture. A 20,000-step search for lumaSkip=r24, chromaSkip=r23, output=r21, tileRow=r20, redOffset=r12, greenOffset=r31 and blueOffset=r30 reaches 6/7 requested colors. Its proposed order includes compiler-created @ temporaries, so it is not an implementable C declaration order and does not prove impossibility over other source shapes. Evidence: `/tmp/sol-x7-rgba-regsim-fresh.txt`. The independently checked older capture gives the same reproduction and search result. No declaration permutation derived from this diagnostic is retained. + +## Final gate and handoff + +Distinct valid compiled source snapshots, excluding the baselines, invalid u8-size probes and initial typedef compile failures: RGB565 setter 31; Y8U8V8 setter 31; RGBA8 setter 31; RGBA411 43. Duplicate invocations from the corrected driver are excluded. All trials and frozen objects/reports are under `/tmp/sol-x7-trials/`. + +Saved newly tested diagnostics outside the repository as `/mnt/drive2/projects/wii-ipl-workers/_luna-runs/best/sol-x7.Texture_MCUtoRGB565.diff`, `sol-x7.Texture_MCUtoY8U8V8.diff` and `sol-x7.Texture_MCUtoRGBA8.diff`. These are rejected diagnostic shapes, not gains. The earlier sol-tex prologue-base diagnostics are unchanged and remain better for studying base materialization. + +Final restored-source gate: GATE PASS. Initial full 43U Ninja build and final full build both passed. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Every owned pool is empty and identical; zero regressions, zero forbidden additions and zero readability warnings. Gate compared against snapshotted ancestor 22e6bbed, one commit before this leaf's 9321a926 baseline; that intervening commit changes completion accounting, not owned source. Evidence: `/tmp/sol-x7-final-gate.log`. + +Exact counts unchanged: RGB565 12/13, Y8U8V8 12/13, RGBA8 11/13. Linked code is zero for each owned unit, as before. Final exact-name scores remain RGB565/RGBA8 setters 93.91765, Y8U8V8 setter 92.78571, RGBA411 82.70661. Restored-source odiff is respectively 169/170, 169/170, 195/196 and 153/242 differing. No function reached zero differing at equal size. Only this log is committed; owned sources, header and configure.py remain byte-identical to HEAD. + +## Scoped optimization follow-up + +User authorizes exactly one function-scoped optimization_level push/pop per setter. Origin/main 9321a926, all three sources already identical. Preserve other functions and shared headers. +- {"trial": "rgb-opt1-baseline", "unit": "RGB565", "diffs": 116, "blind": 21, "insns": [170, 170]} +- {"trial": "rgb-opt1-outer-reverse", "unit": "RGB565", "diffs": 116, "blind": 21, "insns": [170, 170]} +- {"trial": "rgb-opt1-direct-rows", "unit": "RGB565", "diffs": 181, "blind": 176, "insns": [185, 170]} +- {"trial": "rgb-opt1-converters-after-compute", "unit": "RGB565", "diffs": 112, "blind": 14, "insns": [170, 170]} +- {"trial": "rgb-opt1-aftercompute-reverse-row-declarations", "unit": "RGB565", "diffs": 113, "blind": 14, "insns": [170, 170]} +- {"trial": "rgb-opt1-aftercompute-mode-after-pointers", "unit": "RGB565", "diffs": 114, "blind": 14, "insns": [170, 170]} +- {"trial": "rgb-opt1-hoisted-locals", "unit": "RGB565", "diffs": 115, "blind": 23, "insns": [170, 170]} +- {"trial": "rgb-opt1-hoisted-converters", "unit": "RGB565", "diffs": 115, "blind": 15, "insns": [170, 170]} +- {"trial": "rgb-opt1-inline-cbBlock-crBlock", "unit": "RGB565", "diffs": 108, "blind": 17, "insns": [170, 170]} +- {"trial": "rgb-opt1-inline-fourthRow", "unit": "RGB565", "diffs": 114, "blind": 21, "insns": [170, 170]} +- {"trial": "rgb-opt1-inline-secondRow", "unit": "RGB565", "diffs": 159, "blind": 138, "insns": [171, 170]} +- {"trial": "rgb-opt1-inline-fourthRow-thirdRow", "unit": "RGB565", "diffs": 163, "blind": 148, "insns": [173, 170]} +- {"trial": "rgb-opt1-inline-cbBlock-crBlock-fourthRow", "unit": "RGB565", "diffs": 104, "blind": 17, "insns": [170, 170]} +- {"trial": "rgb-opt1-stored-rows", "unit": "RGB565", "diffs": 168, "blind": 161, "insns": [166, 170]} +- {"trial": "rgb-opt1-cursor", "unit": "RGB565", "diffs": 166, "blind": 155, "insns": [167, 170]} +- {"trial": "rgb-opt1-assign-store", "unit": "RGB565", "diffs": 112, "blind": 13, "insns": [170, 170]} +- {"trial": "rgb-opt0-baseline", "unit": "RGB565", "diffs": 228, "blind": 216, "insns": [230, 170]} +- {"trial": "rgb-opt0-stored-rows", "unit": "RGB565", "diffs": 190, "blind": 188, "insns": [191, 170]} +- {"trial": "rgb-opt0-assign-store", "unit": "RGB565", "diffs": 213, "blind": 211, "insns": [215, 170]} +- {"trial": "rgb-opt0-inline-cbBlock-crBlock-fourthRow", "unit": "RGB565", "diffs": 212, "blind": 211, "insns": [213, 170]} +- {"trial": "rgb-opt1-case-converter-first", "unit": "RGB565", "diffs": 112, "blind": 13, "insns": [170, 170]} +- {"trial": "rgb-opt1-case-converter-last", "unit": "RGB565", "diffs": 111, "blind": 13, "insns": [170, 170]} +- {"trial": "rgb-opt1-reverse-all-pointers", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-reverse-all-and-outer", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-initialized", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-const-state", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-const-buffer", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-late-state", "unit": "RGB565", "diffs": 169, "blind": 167, "insns": [166, 170]} +- {"trial": "rgb-opt1-signed-count", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-tail-swap-addends", "unit": "RGB565", "diffs": 54, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-tail-direct-width-height", "unit": "RGB565", "diffs": 64, "blind": 30, "insns": [172, 170]} +- {"trial": "rgb-opt1-tail-rounded-locals", "unit": "RGB565", "diffs": 51, "blind": 5, "insns": [170, 170]} +- {"trial": "rgb-opt1-tail-padding-locals", "unit": "RGB565", "diffs": 55, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-tail-remainders-locals", "unit": "RGB565", "diffs": 57, "blind": 18, "insns": [170, 170]} +- {"trial": "rgb-opt1-tail-rounded-assign-back", "unit": "RGB565", "diffs": 52, "blind": 5, "insns": [170, 170]} +- {"trial": "rgb-opt1-round-swap-loads", "unit": "RGB565", "diffs": 51, "blind": 5, "insns": [170, 170]} +- {"trial": "rgb-opt1-round-swap-rounds", "unit": "RGB565", "diffs": 57, "blind": 12, "insns": [170, 170]} +- {"trial": "rgb-opt1-round-swap-addends", "unit": "RGB565", "diffs": 57, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-round-multiply-first", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-shape-tail-helper", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-shape-case0-outer", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-shape-count-direct", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-shape-dims-outer", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-shape-case3-outer", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-entry-021", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-entry-102", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-entry-120", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-entry-201", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-entry-210", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-finalinline-cbBlock", "unit": "RGB565", "diffs": 58, "blind": 16, "insns": [170, 170]} +- {"trial": "rgb-opt1-finalinline-crBlock", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-finalinline-cbBlock-crBlock", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-finalinline-fourthRow-cbBlock-crBlock", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-finalinline-fourthRow-crBlock", "unit": "RGB565", "diffs": 56, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-finalinline-secondRow", "unit": "RGB565", "diffs": 57, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-finalinline-fourthRow", "unit": "RGB565", "diffs": 59, "blind": 13, "insns": [170, 170]} +- {"trial": "rgb-opt1-work-copy", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-state-copy", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-state-void", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-state-array", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-buffer-array", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-buffer-s8", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-quotient-divisor-unsigned", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-mod-divisor-long", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-all-unique-first", "unit": "RGB565", "diffs": 50, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-all-unique-last", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-all-unique-between", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-unique-tail-swap-addends", "unit": "RGB565", "diffs": 16, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-unique-tail-rounded-locals", "unit": "RGB565", "diffs": 18, "blind": 5, "insns": [170, 170]} +- {"trial": "rgb-opt1-unique-tail-padding-locals", "unit": "RGB565", "diffs": 22, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-unique-tail-remainders-locals", "unit": "RGB565", "diffs": 27, "blind": 18, "insns": [170, 170]} +- {"trial": "rgb-opt1-unique-tail-rounded-assign-back", "unit": "RGB565", "diffs": 19, "blind": 5, "insns": [170, 170]} +- {"trial": "rgb-opt1-unique-round-swap-addends", "unit": "RGB565", "diffs": 25, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-operand-reverse", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-shift-spelling", "unit": "RGB565", "compile": "FAIL"} +- {"trial": "rgb-opt1-case3-shift-fixed", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-mode-u32", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-offset-local", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-cb-before-second", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-cr-before-second", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-compute-before-converters", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-second-after-stores", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-case3-array-index", "unit": "RGB565", "diffs": 17, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-round2-dividend-updates", "unit": "RGB565", "diffs": 22, "blind": 15, "insns": [170, 170]} +- {"trial": "rgb-opt1-round2-quotient-locals", "unit": "RGB565", "diffs": 22, "blind": 8, "insns": [170, 170]} +- {"trial": "rgb-opt1-round2-s32-rounded", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-round2-dimension-copy", "unit": "RGB565", "diffs": 22, "blind": 15, "insns": [170, 170]} +- {"trial": "rgb-current-inspect", "unit": "RGB565", "diffs": 22, "blind": 15, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-reverse-round-decls", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-separate-round-decls", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-height-first", "unit": "RGB565", "diffs": 24, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-width-reuse", "unit": "RGB565", "compile": "FAIL"} +- {"trial": "rgb-opt1-round3-height-reuse", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-both-reuse", "unit": "RGB565", "diffs": 16, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-swap-width-expr", "unit": "RGB565", "diffs": 23, "blind": 8, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-swap-height-expr", "unit": "RGB565", "diffs": 16, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-round3-swap-both-expr", "unit": "RGB565", "diffs": 22, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-s32-rounding-inspect", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-boolean-0", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-boolean-1", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-boolean-2", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-boolean-3", "unit": "RGB565", "diffs": 16, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-boolean-4", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-boolean-5", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-s32-u32", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-s32-s16", "unit": "RGB565", "diffs": 21, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-s32-u16", "unit": "RGB565", "diffs": 21, "blind": 5, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u32-s32", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u32-u32", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u32-s16", "unit": "RGB565", "diffs": 21, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u32-u16", "unit": "RGB565", "diffs": 21, "blind": 5, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-s16-s32", "unit": "RGB565", "diffs": 21, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-s16-u32", "unit": "RGB565", "diffs": 21, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-s16-s16", "unit": "RGB565", "diffs": 21, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-s16-u16", "unit": "RGB565", "diffs": 16, "blind": 3, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u16-s32", "unit": "RGB565", "diffs": 21, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u16-u32", "unit": "RGB565", "diffs": 21, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u16-s16", "unit": "RGB565", "diffs": 16, "blind": 3, "insns": [170, 170]} +- {"trial": "rgb-opt1-dimtypes-u16-u16", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-0", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-1", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-2", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-3", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-4", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-5", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-01", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-02", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-03", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-04", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-05", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-12", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-13", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-14", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-15", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-23", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-24", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-25", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-34", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-35", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-45", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-012", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-013", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-014", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-015", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-023", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-024", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-025", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-034", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-035", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-045", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-123", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-124", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-125", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-134", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-135", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-145", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-234", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-235", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-245", "unit": "RGB565", "diffs": 70, "blind": 29, "insns": [170, 170]} +- {"trial": "rgb-opt1-minhoist-345", "unit": "RGB565", "diffs": 48, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-real-round-helper-0", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-real-round-helper-1", "unit": "RGB565", "diffs": 21, "blind": 12, "insns": [170, 170]} +- {"trial": "rgb-opt1-real-round-helper-2", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-real-round-helper-3", "unit": "RGB565", "diffs": 19, "blind": 15, "insns": [170, 170]} +- {"trial": "RGBA8-opt1-baseline", "unit": "RGBA8", "diffs": 116, "blind": 21, "insns": [170, 170]} +- {"trial": "RGBA8-opt1-global-source-order", "unit": "RGBA8", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "RGBA8-opt1-s32-rounds", "unit": "RGBA8", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "RGBA8-opt1-signed-dimensions-quotient-last", "unit": "RGBA8", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "RGBA8-opt1-swap-addends", "unit": "RGBA8", "diffs": 13, "blind": 4, "insns": [170, 170]} +- {"trial": "RGBA8-opt1-opt0", "unit": "RGBA8", "diffs": 238, "blind": 231, "insns": [240, 170]} +- {"trial": "Y8U8V8-opt1-baseline", "unit": "Y8U8V8", "diffs": 134, "blind": 27, "insns": [196, 196]} +- {"trial": "Y8U8V8-opt1-global-source-order", "unit": "Y8U8V8", "diffs": 28, "blind": 12, "insns": [196, 196]} +- {"trial": "Y8U8V8-opt1-s32-rounds", "unit": "Y8U8V8", "compile": "FAIL"} +- {"trial": "Y8U8V8-opt1-signed-dimensions-quotient-last", "unit": "Y8U8V8", "compile": "FAIL"} +- {"trial": "Y8U8V8-opt1-swap-addends", "unit": "Y8U8V8", "diffs": 26, "blind": 8, "insns": [196, 196]} +- {"trial": "Y8U8V8-opt1-opt0", "unit": "Y8U8V8", "diffs": 263, "blind": 259, "insns": [265, 196]} +- {"trial": "rgb-opt1-shiftround-1", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-2", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-3", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-4", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-5", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-6", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-7", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-8", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-9", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-10", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-11", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-12", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-13", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-14", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-shiftround-15", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-round4-width-only", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-round4-height-only", "unit": "RGB565", "diffs": 24, "blind": 9, "insns": [170, 170]} +- {"trial": "rgb-opt1-round4-height-only-separate", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-round4-width-only-quot", "unit": "RGB565", "diffs": 14, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-round4-height-only-quot", "unit": "RGB565", "diffs": 22, "blind": 8, "insns": [170, 170]} +- {"trial": "rgb-opt1-round4-height-unsigned", "unit": "RGB565", "diffs": 15, "blind": 2, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-u32-1", "unit": "RGB565", "diffs": 22, "blind": 12, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-u32-2", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-u32-3", "unit": "RGB565", "diffs": 13, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-rounded-1", "unit": "RGB565", "diffs": 23, "blind": 8, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-rounded-2", "unit": "RGB565", "diffs": 16, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-rounded-3", "unit": "RGB565", "diffs": 22, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-only-1", "unit": "RGB565", "diffs": 22, "blind": 12, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-only-2", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-asymmetric-only-3", "unit": "RGB565", "diffs": 13, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-height-padding-after", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-height-padding-before", "unit": "RGB565", "diffs": 21, "blind": 7, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-height-rounded-after", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-both-round-before", "unit": "RGB565", "diffs": 16, "blind": 6, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-height-quot-after", "unit": "RGB565", "diffs": 22, "blind": 8, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-height-compare-unsigned", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-height-compare-signed", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-multiply-negative", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-last4-height-helper", "unit": "RGB565", "diffs": 4, "blind": 4, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-s32-s32-0", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-s32-s32-1", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-s32-u32-0", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-s32-u32-1", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-u32-s32-0", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-u32-s32-1", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-u32-u32-0", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-opt1-width-round-height-pad-u32-u32-1", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-exact-confirm", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-exact-minhoist-012", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "rgb-exact-minhoist-023", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "RGBA8-exact-transfer", "unit": "RGBA8", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "Y8U8V8-exact-transfer", "unit": "Y8U8V8", "diffs": 0, "blind": 0, "insns": [196, 196]} +- {"trial": "RGB565-final-minimal", "unit": "RGB565", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "RGBA8-final-minimal", "unit": "RGBA8", "diffs": 0, "blind": 0, "insns": [170, 170]} +- {"trial": "Y8U8V8-final-minimal", "unit": "Y8U8V8", "diffs": 0, "blind": 0, "insns": [196, 196]} + +## Exact source and review + +All three setters reach exact-name objdiff 100.0 and ctxdiff diffs 0 at target counts 170, 196, 170. Empty pools identical. RGB565 and Y8U8V8 reach 13/13; RGBA8 reaches 12/13 and retains its prior open 411 converter unchanged. Scope each optimization_level 1 push/pop to the setter only. No shared header edit or other converter body edit. + +Changes are real converter pointer locals, reverse pointer declaration order, C89 declarations for the 411/422/420 cases before buffer/state, converter stores before row stores, a widened unsigned mode local for the 211 row stride, and separate roundedWidth and heightPadding calculations before the dimension stores. Y8U8V8 applies the same calculations to both dimension pairs, using 8 for widths and 4 for heights. Source groups 012 and 023 both preserve exactness; retain 012, which relocates fewer declarations than the all-case diagnostic. + +Signed short dimension probes are semantically invalid for JPEG dimensions above 32767 and excluded from candidate selection. The unparenthesized row-shift probe failed compilation. Initial planar rounded-local probes violated C89 declaration placement and failed compilation; the final explicit assignments follow all declarations. No invalid or failed candidate is retained. + +Instruction and symbol order verified independently before the Matching flips. Symorder ORDER OK for all three units, 13 identical text symbols each. RGB565 and Y8U8V8 are set Matching, pending full DOL verification; RGBA8 stays NonMatching. + +Live gate.py currently lists optimization_level in NOTES as a per-function optimization review note, not HACKS. Report the actual final gate output; do not change the gate. + +## Final scoped-optimization gate + +Final source review confirms all 12 sibling converter bodies in each unit are byte-identical to origin/main. Each source contains exactly one push/optimization_level 1/pop scope surrounding its setter. No helper, header, artificial assembly or inventory change remains. + +The signed height remainder is evaluated into heightPadding before the unsigned height quotient and after the width tile count, then width and height are stored in target order. This fixes both srwi scheduling and register reuse. JPEG dimensions are u16, so s32 roundedWidth fits for all input values; positive dimensions and pointer arithmetic preserve the original values. + +Compiled unique source snapshots in the follow-up, excluding signed-short dimension diagnostics: {"RGB565": 200, "Y8U8V8": 7, "RGBA8": 9}. Frozen sources, objects, build diagnostics and disassemblies remain in /tmp/sol-x7-opt/. Initial and near-exact immutable MWCC captures are /mnt/drive2/projects/wii-ipl-workers/_mwdbg/runs/sol-x7-opt-rgb and sol-x7-opt-rgb-round. The initial allocator simulator reproduces 96/96 nodes; it predicts buffer/state can swap only after broader declaration changes, implemented with actual C89 locals. The near-exact capture supplies the tail creation-order evidence. + +Fresh ninja progress build/43U/report.json build/43U/ok succeeded. No other unit's report differs from the saved scoped-RGB checkpoint. RGB565 links all 6184 code bytes; Y8U8V8 links all 15948 code bytes, a total of 22132 newly linked bytes. Both units have no data sections and matched_data_percent 100.0. RGBA8 remains unlinked because its unchanged 411 converter is 82.70661. Three setters add 2144 exactly matched code bytes. + +Final gate evidence from /tmp/sol-x7-opt-final-gate.log: + +```text +full build: ok +main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] pool: IDENTICAL +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] objdiff: code 6184/6184 data None/None functions 13/13 fuzzy 100.0000 linked code 6184 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] instruction-exact functions: 13/13 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] section .text size 6184 match 100.0 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565] baseline: code 5504/6184 data None functions 12 fuzzy 99.3312 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 15948/15948 data None/None functions 13/13 fuzzy 100.0000 linked code 15948 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 13/13 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 100.0 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 15164/15948 data None functions 12 fuzzy 99.6453 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] pool: IDENTICAL +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] objdiff: code 5628/6596 data None/None functions 12/13 fuzzy 97.4621 linked code 0 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] instruction-exact functions: 12/13 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] section .text size 6596 match 97.4621 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] below 100: TMCJPEGDEC_converterYUV411toRGBA8 82.70661 +[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8] baseline: code 4948/6596 data None functions 11 fuzzy 96.8350 +regressions vs baseline: 0 +global matched_code_percent: 97.58331 -> 97.65490 +global fuzzy_match_percent: 99.89996 -> 99.90462 +global complete_code_percent: 88.95958 -> 89.69850 +global matched_data_percent: 100.00000 -> 100.00000 +forbidden patterns added (net, per file): 0 +readability warnings (net, per file; must be 0 in the final result): 0 +review note: libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGB565.c: per-function optimization pragma (levers 26: orchestrator checks the per-use address recompute evidence) (+1 net), e.g. #pragma optimization_level 1 +review note: libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoRGBA8.c: per-function optimization pragma (levers 26: orchestrator checks the per-use address recompute evidence) (+1 net), e.g. #pragma optimization_level 1 +review note: libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.c: per-function optimization pragma (levers 26: orchestrator checks the per-use address recompute evidence) (+1 net), e.g. #pragma optimization_level 1 +note: config touched: configure.py (orchestrator reviews every config/symbols change) +GATE PASS +``` + +No automatic pragma failure occurred. The three actual gate lines are review notes for per-function optimization pragmas. No gate or external tool was edited. Final DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. + +Local RGB565 exact-setter commit: 5315fa04. The near-exact allocator simulator reproduces 95/95 virtual registers. Y8U8V8 is committed next with both fully exact unit Matching flips; the final gate above covers this source and configuration. + +Local Y8U8V8 exact-setter and Matching-flips commit: 9bb9d719. The RGBA8 setter is exact and committed next; its unchanged 411 converter remains open, so RGBA8 stays NonMatching. All final source was independently rebuilt and gated before these local commits; commits introduce no further code changes.