We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
LDR r0, [r4] // Load 4 pixels A:B:C:D from (x,y) LDR r1, [r5] // Load 4 pixels E:F:G:H from (x,y+1) UHADD8 r2, r0, r1 // Add pixels A:B:C:D with pixels E:F:G:H and divide each pixel by 2. UXTB r3, r2 // Set r3 = (D+H)/2 UXTAB r3, r3, r2, ROR #8 // Set r3 = r3 + (C+G)/2 UXTAB r3, r3, r2, ROR #16 // Set r3 = r3 + (B+F)/2 UXTAB r3, r3, r2, ROR #24 // Set r3 = r3 + (A+E)/2 // r3 is now (A+E)/2 + (B+F)/2 + (C+G)/2 + (D+H)/2 // which is (A+B+C+D + E+F+G+H) / 2 LSR r3, r3, 2 // Set r3 = average of 8 pixels A to H