We can use reference frames from the stored frame in the memory, but we generate reference frame at both the encoder and decoder side because decoder don't has information about input frame, it only has information of bitstream.
I have two doubts related to reference frame generation (see attached block diagram):
1. How can frame store give output as reference frame (previous or next), because it is taking input as (residual error+predicted frame), So it should give current (input) frame as output.
2. While computing the reference frame, we don't have predicted frame value. Then how can we use it for reference frame computation?