big refactoring to align both open hevc and libav
fix divx sequence