Initialize scaling_list_dc (avoids branching on uninitialized value)
Avoid undefined behavior in memcpy calls

"The memcpy() function shall copy n bytes from the object pointed to by s2 into the object pointed to by s1. If copying takes place between objects that overlap, the behavior is undefined."