avcodec/diracdec: fix undefined behavior with shifts