mjpegenc: support slice multithreading