summaryrefslogtreecommitdiff
path: root/src/libmpeg2/libmpeg2_accel.c
diff options
context:
space:
mode:
authorThomas Hellström <totte67@users.sourceforge.net>2005-05-06 07:42:20 +0000
committerThomas Hellström <totte67@users.sourceforge.net>2005-05-06 07:42:20 +0000
commit143e6ca14ef8d043cc01e922ac6ed03e20b71606 (patch)
tree855efbe1c21374b95cda01984dd53db058f78607 /src/libmpeg2/libmpeg2_accel.c
parente3e426cc9029ba7072bf48a4789ec04c179b63f1 (diff)
downloadxine-lib-143e6ca14ef8d043cc01e922ac6ed03e20b71606.tar.gz
xine-lib-143e6ca14ef8d043cc01e922ac6ed03e20b71606.tar.bz2
**BUGFIX**
improve xxmc cpu-usage for IDCT / MOCOMP acceleration through better locking [bug #1195282] CVS patchset: 7524 CVS date: 2005/05/06 07:42:20
Diffstat (limited to 'src/libmpeg2/libmpeg2_accel.c')
-rw-r--r--src/libmpeg2/libmpeg2_accel.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/libmpeg2/libmpeg2_accel.c b/src/libmpeg2/libmpeg2_accel.c
index 376ae3979..54bdee549 100644
--- a/src/libmpeg2/libmpeg2_accel.c
+++ b/src/libmpeg2/libmpeg2_accel.c
@@ -147,8 +147,8 @@ libmpeg2_accel_frame_completion(mpeg2dec_accel_t * accel, uint32_t frame_format,
int
-libmpeg2_accel_slice(mpeg2dec_accel_t *accel, uint32_t frame_format, picture_t *picture,
- int code, char * buffer, uint32_t chunk_size, uint8_t *chunk_buffer)
+libmpeg2_accel_slice(mpeg2dec_accel_t *accel, picture_t *picture, int code, char * buffer,
+ uint32_t chunk_size, uint8_t *chunk_buffer)
{
/*
* Don't reference frames of other formats. They are invalid. This may happen if the
@@ -172,13 +172,21 @@ libmpeg2_accel_slice(mpeg2dec_accel_t *accel, uint32_t frame_format, picture_t *
}
}
+ switch( picture->current_frame->format ) {
- switch( frame_format ) {
case XINE_IMGFMT_XXMC:
{
xine_xxmc_t *xxmc = (xine_xxmc_t *)
picture->current_frame->accel_data;
+ if ( xxmc->proc_xxmc_lock_valid( picture->current_frame,
+ picture->forward_reference_frame,
+ picture->backward_reference_frame,
+ picture->current_frame->picture_coding_type)) {
+ picture->v_offset = 0;
+ return 1;
+ }
+
switch(picture->current_frame->format) {
case XINE_IMGFMT_XXMC:
switch(xxmc->acceleration) {
@@ -198,11 +206,14 @@ libmpeg2_accel_slice(mpeg2dec_accel_t *accel, uint32_t frame_format, picture_t *
mpeg2_slice (picture, code, buffer);
break;
}
+ xxmc->proc_xxmc_unlock(picture->current_frame->driver);
break;
}
+
case XINE_IMGFMT_XVMC:
mpeg2_xvmc_slice (accel, picture, code, buffer);
break;
+
default:
mpeg2_slice (picture, code, buffer);
break;