Added coord-pixel conversion and reference pictures