Bug 1520760 Comment 32 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> Which begs the question:
> https://searchfox.org/mozilla-central/source/media/libjpeg/simd/i386/jsimd.c#1137
> 
> Who guarantees that init_simd() will precede that in the calling sequence? Maybe we should just throw an init_simd() on top of that function? This isn't very obvious without being familiar with the code.

jsimd.c isn't a standalone API, so nothing other than the libjpeg API library code will be calling those functions, and in the libjpeg API library, a jsimd_*() function is never called prior to its associated jsimd_can_*() function.
> Which begs the question:
> https://searchfox.org/mozilla-central/source/media/libjpeg/simd/i386/jsimd.c#1137
> 
> Who guarantees that init_simd() will precede that in the calling sequence? Maybe we should just throw an init_simd() on top of that function? This isn't very obvious without being familiar with the code.

jsimd.c isn't a standalone API, so nothing other than the libjpeg API library code will be calling those functions, and in the libjpeg API library, a jsimd_\*() function is never called prior to its associated jsimd_can_\*() function.

Back to Bug 1520760 Comment 32