asm: fix invalid read in upShift routine

--HG--
branch : stable
frameencoder: store the reference state of the picture in FrameEncoder

We find that reference state of the reference frame changed during the encode
when we use frame-thread > 1 this cause the CU level QP for the frame is
non-deterministic, this is leading the non-deterministic encoded output for the
frame, to avoid this store the reference state of the frame to
FrameEncoder->m_isReferenced and when the QP is calculate for CU, refer the
reference state of the frame from FrameEncoder->m_isReferenced this stat will
never change during the encode

Moved slice reference state initialization from dpb to FrameEncoder initSlice()

--HG--
extra : amend_source : 817e8c607eab5cc48501491c066da38f163e0e1c
Added tag 0.9 for changeset 82bbd2bf3b49

--HG--
branch : stable
Merge with stable
frameencoder: comment nit
frameencoder: use m_isReferenced when configuring SAO in compressFrame()

In some pessimal situations, the slice's reference state could even be changed
by the time compressFrame() starts.  This prevents any race hazard.