encoder: implement wavefront parallel processing
(minor edits)
encoder: multithreading for WPP