decode motion & modulo optimize patch by (BERO <bero at geocities dot co dot jp>)