Skip to content

Commit

Permalink
Call emms before returning from Analyse and Recalculate
Browse files Browse the repository at this point in the history
The mmx functions from x264 don't do it.

Fixes crashes with block width of 16 or lower.
  • Loading branch information
cantabile committed Sep 22, 2014
1 parent 06f6f6a commit c33370d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@

uint32_t cpu_detect( void );

extern "C" void mvtools_cpu_emms();

#endif
2 changes: 2 additions & 0 deletions src/MVAnalyse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ static const VSFrameRef *VS_CC mvanalyseGetFrame(int n, int activationReason, vo
delete vectorFields;
}

// FIXME: Get rid of all mmx shit.
mvtools_cpu_emms();

vsapi->freeFrame(src);

Expand Down
2 changes: 2 additions & 0 deletions src/MVRecalculate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ static const VSFrameRef *VS_CC mvrecalculateGetFrame(int n, int activationReason
delete vectorFields;
}

// FIXME: Get rid of all mmx shit.
mvtools_cpu_emms();

vsapi->freeFrame(src);

Expand Down

0 comments on commit c33370d

Please sign in to comment.