mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-08 08:20:36 +00:00
The six .ifc cascades that gate 16bpp behavior in yuv2rgb_neon.S (linesize padding in three load_args macros, d8/d9 save/restore, main-loop pack dispatch) all branch on the same four output formats. Aggregate the predicate into four GAS .set symbols emitted once per declare_func via a new set_rgb16_predicates macro: rgb16 - 1 for *565le and *555le outputs; 0 otherwise r_first - 1 for rgb*le (R high); 0 for bgr*le (B high) gshift - 2 for 565, 3 for 555 (passed as pack_rgb16's g_shr) hshift - 11 for 565, 10 for 555 (passed as pack_rgb16's high_shl) Call sites become a flat ".if rgb16" gate (five places) plus a 2-way ".if r_first" inside ".if rgb16" for the pack dispatch (one place). .if/.endif count drops from 46 to 33; -88/+49 lines net. Pure source-level refactor: the full object disassembly is byte-for-byte identical to the pre-refactor build (MD5 2a6ac497cabc81849e0c80ec0fde0550 on Apple M1, clang). checkasm --test=sw_yuv2rgb 110/110, full checkasm 7657/7657. Signed-off-by: DROOdotFOO <drew@axol.io> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| asm-offsets.h | ||
| hscale.S | ||
| input.S | ||
| Makefile | ||
| ops.c | ||
| ops_asmgen.c | ||
| ops_entries.c | ||
| ops_impl.c | ||
| ops_impl.h | ||
| ops_impl_conv.c | ||
| ops_lookup.h | ||
| output.S | ||
| range_convert_neon.S | ||
| rasm.c | ||
| rasm.h | ||
| rasm_print.c | ||
| rgb2rgb.c | ||
| rgb2rgb_neon.S | ||
| swscale.c | ||
| swscale_unscaled.c | ||
| swscale_unscaled_neon.S | ||
| xyz2rgb_neon.S | ||
| yuv2rgb_neon.S | ||