add ref-original frame assigment
Merge pull request #926 from ruil2/enc_reforg

    add ref-original frame assigment