Fix buffer overrun if idx is negative (it can be down to -23>>4), by prepending
two padding zeroes before it. Should fix fate failures on openBSD and crashes
on MacOSX (that I cannot reproduce).

Originally committed as revision 24750 to svn://svn.ffmpeg.org/ffmpeg/trunk
