Remove copy in codec