And thats it! I made a test which confirmed my guess. The problem is
really in transitions between SSE and AVX. I modified the loop_filter()
function from libavcodec/h264.c so there is __asm__("vzeroall") before and
after all calls to the ff_h264_filter_mb() and ff_h264_filter_mb_fast()
functions. The result looks like this:

...
__asm__("vzeroall");
if (FRAME_MBAFF) {
    ff_h264_filter_mb(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize,
uvlinesize);
} else {
    ff_h264_filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr,
linesize, uvlinesize);
}
__asm__("vzeroall");
...

I think all AVX code in Libav should be protected like this.
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to