* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#ifndef _MSC_VER
-#include <unistd.h>
-#endif
-
#include "common.h"
#define PADH 32
for( j = 0; j < h->param.i_bframe + 2; j++ )
CHECKED_MALLOC( frame->i_row_satds[i][j], i_lines/16 * sizeof(int) );
- pthread_mutex_init( &frame->mutex, NULL );
- pthread_cond_init( &frame->cv, NULL );
+ x264_pthread_mutex_init( &frame->mutex, NULL );
+ x264_pthread_cond_init( &frame->cv, NULL );
return frame;
x264_free( frame->mv[1] );
x264_free( frame->ref[0] );
x264_free( frame->ref[1] );
- pthread_mutex_destroy( &frame->mutex );
- pthread_cond_destroy( &frame->cv );
+ x264_pthread_mutex_destroy( &frame->mutex );
+ x264_pthread_cond_destroy( &frame->cv );
x264_free( frame );
}
#ifdef HAVE_PTHREAD
void x264_frame_cond_broadcast( x264_frame_t *frame, int i_lines_completed )
{
- pthread_mutex_lock( &frame->mutex );
+ x264_pthread_mutex_lock( &frame->mutex );
frame->i_lines_completed = i_lines_completed;
- pthread_cond_broadcast( &frame->cv );
- pthread_mutex_unlock( &frame->mutex );
+ x264_pthread_cond_broadcast( &frame->cv );
+ x264_pthread_mutex_unlock( &frame->mutex );
}
void x264_frame_cond_wait( x264_frame_t *frame, int i_lines_completed )
{
- pthread_mutex_lock( &frame->mutex );
+ x264_pthread_mutex_lock( &frame->mutex );
while( frame->i_lines_completed < i_lines_completed )
- pthread_cond_wait( &frame->cv, &frame->mutex );
- pthread_mutex_unlock( &frame->mutex );
+ x264_pthread_cond_wait( &frame->cv, &frame->mutex );
+ x264_pthread_mutex_unlock( &frame->mutex );
}
#else