pipe = dev->context;
screen = dev->vscreen->pscreen;
- pipe_mutex_lock(dev->mutex);
+ mtx_lock(&dev->mutex);
supported = screen->get_video_param
(
PIPE_VIDEO_CAP_SUPPORTED
);
if (!supported) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_INVALID_DECODER_PROFILE;
}
PIPE_VIDEO_CAP_MAX_HEIGHT
);
if (width > maxwidth || height > maxheight) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_INVALID_SIZE;
}
vldecoder = CALLOC(1,sizeof(vlVdpDecoder));
if (!vldecoder) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_RESOURCES;
}
goto error_handle;
}
- pipe_mutex_init(vldecoder->mutex);
- pipe_mutex_unlock(dev->mutex);
+ (void) mtx_init(&vldecoder->mutex, mtx_plain);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
vldecoder->decoder->destroy(vldecoder->decoder);
error_decoder:
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
DeviceReference(&vldecoder->device, NULL);
FREE(vldecoder);
return ret;
if (!vldecoder)
return VDP_STATUS_INVALID_HANDLE;
- pipe_mutex_lock(vldecoder->mutex);
+ mtx_lock(&vldecoder->mutex);
vldecoder->decoder->destroy(vldecoder->decoder);
- pipe_mutex_unlock(vldecoder->mutex);
- pipe_mutex_destroy(vldecoder->mutex);
+ mtx_unlock(&vldecoder->mutex);
+ mtx_destroy(&vldecoder->mutex);
vlRemoveDataHTAB(decoder);
DeviceReference(&vldecoder->device, NULL);
memcpy(picture->RefPicSetStCurrBefore, picture_info->RefPicSetStCurrBefore, 8);
memcpy(picture->RefPicSetStCurrAfter, picture_info->RefPicSetStCurrAfter, 8);
memcpy(picture->RefPicSetLtCurr, picture_info->RefPicSetLtCurr, 8);
+ picture->UseRefPicList = false;
return VDP_STATUS_OK;
}
vlVdpDecoderFixVC1Startcode(uint32_t *num_buffers, const void *buffers[], unsigned sizes[])
{
static const uint8_t vc1_startcode[] = { 0x00, 0x00, 0x01, 0x0D };
- struct vl_vlc vlc;
+ struct vl_vlc vlc = {};
unsigned i;
/* search the first 64 bytes for a startcode */
dec->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM) ||
!buffer_support[vlsurf->video_buffer->interlaced]) {
- pipe_mutex_lock(vlsurf->device->mutex);
+ mtx_lock(&vlsurf->device->mutex);
/* destroy the old one */
if (vlsurf->video_buffer)
/* still no luck? get me out of here... */
if (!vlsurf->video_buffer) {
- pipe_mutex_unlock(vlsurf->device->mutex);
+ mtx_unlock(&vlsurf->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
}
vlVdpVideoSurfaceClear(vlsurf);
- pipe_mutex_unlock(vlsurf->device->mutex);
+ mtx_unlock(&vlsurf->device->mutex);
}
for (i = 0; i < bitstream_buffer_count; ++i) {
if (ret != VDP_STATUS_OK)
return ret;
- pipe_mutex_lock(vldecoder->mutex);
+ mtx_lock(&vldecoder->mutex);
dec->begin_frame(dec, vlsurf->video_buffer, &desc.base);
dec->decode_bitstream(dec, vlsurf->video_buffer, &desc.base, bitstream_buffer_count, buffers, sizes);
dec->end_frame(dec, vlsurf->video_buffer, &desc.base);
- pipe_mutex_unlock(vldecoder->mutex);
+ mtx_unlock(&vldecoder->mutex);
return ret;
}