hevcdsp_template: fix variables declared in the middle of a block