From fc47733b7e943919a6492ef6f863e82ef9cdbc5d Mon Sep 17 00:00:00 2001 From: duckyduckg Date: Tue, 29 Sep 2026 04:18:49 +0500 Subject: [PATCH] sdm845-common: Patch codec2 for legacy 128x32 alignment Note: values were taken from stock msmnile codec2 using ghidra. on kona platforms or newer or older, if IsCameraCustomFormat fails c2 enforces 512x512 alignment. after this patch with IsCameraCustomFormat disabled on legacy CamX, incoming buffers retain standard Venus 128x32 alignment. 1. qc2::QC2Buffer::Graphic::GetAlignedHeight - File_Offset: 0x138D2 - Assembly: 0x138D2: 00 F2 FF 11 -> 00 F2 1F 01 ; addw r1, r0, #0x1f 0x138D6: 40 F2 FF 12 -> 40 F2 1F 02 ; movw r2, #0x1f - ALIGN(h, 512) -> ALIGN(h, 32) 2. qc2::QC2Buffer::Graphic::GetAlignedWidth - File_Offset: 0x1397C - Assembly: 0x1397C: 00 F2 FF 11 -> 00 F2 7F 01 ; addw r1, r0, #0x7f 0x13980: 40 F2 FF 12 -> 40 F2 7F 02 ; movw r2, #0x7f - ALIGN(w, 512) -> ALIGN(w, 128) Change-Id: I154b556cbefdbbd47a6c315d38fb468aed39f1b7 Signed-off-by: duckyduckg --- proprietary/vendor/lib/libqcodec2_utils.so | Bin 149284 -> 149284 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/proprietary/vendor/lib/libqcodec2_utils.so b/proprietary/vendor/lib/libqcodec2_utils.so index 23f328a86fd630bb08c586672b7bc222eb7b1cdb..cbef61cbf50f68dfdd48ecba54bc44b1f1d03031 100644 GIT binary patch delta 40 vcmZ3|$GN1BvtbM46$>_bMu$)GOw(^!FfL)M2eRv#+FL9cx3^d_E#L(JEr|{w delta 40 rcmZ3|$GN1BvtbM46$`fif)1bl3r)Xe!MFsizw15`?ZOIWJ