mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 02:00:21 +01:00
st/vdpau: remove unnecessary tracing and adjust tracing levels a bit
Tracing function entry/exits is a bit pointless when VDPAU_TRACE=1 does the same thing. v2: use WARN instead of ERR for application problems Signed-off-by: Christian König <deathsimple@vodafone.de>
This commit is contained in:
parent
a206c4cd69
commit
736dda82ca
7 changed files with 4 additions and 64 deletions
|
|
@ -50,8 +50,6 @@ vlVdpDecoderCreate(VdpDevice device,
|
|||
VdpStatus ret;
|
||||
bool supported;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating decoder\n");
|
||||
|
||||
if (!decoder)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
*decoder = 0;
|
||||
|
|
@ -104,8 +102,6 @@ vlVdpDecoderCreate(VdpDevice device,
|
|||
goto error_handle;
|
||||
}
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoder created succesfully\n");
|
||||
|
||||
return VDP_STATUS_OK;
|
||||
|
||||
error_handle:
|
||||
|
|
@ -125,8 +121,6 @@ vlVdpDecoderDestroy(VdpDecoder decoder)
|
|||
{
|
||||
vlVdpDecoder *vldecoder;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying decoder\n");
|
||||
|
||||
vldecoder = (vlVdpDecoder *)vlGetDataHTAB(decoder);
|
||||
if (!vldecoder)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -149,8 +143,6 @@ vlVdpDecoderGetParameters(VdpDecoder decoder,
|
|||
{
|
||||
vlVdpDecoder *vldecoder;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoder get parameters called\n");
|
||||
|
||||
vldecoder = (vlVdpDecoder *)vlGetDataHTAB(decoder);
|
||||
if (!vldecoder)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -403,8 +395,6 @@ vlVdpDecoderRender(VdpDecoder decoder,
|
|||
struct pipe_h264_picture_desc h264;
|
||||
} desc;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoding\n");
|
||||
|
||||
if (!(picture_info && bitstream_buffers))
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
|
|||
vl_compositor_init(&dev->compositor, dev->context->pipe);
|
||||
|
||||
*get_proc_address = &vlVdpGetProcAddress;
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Device created succesfully\n");
|
||||
|
||||
return VDP_STATUS_OK;
|
||||
|
||||
|
|
@ -105,8 +104,6 @@ vlVdpPresentationQueueTargetCreateX11(VdpDevice device, Drawable drawable,
|
|||
vlVdpPresentationQueueTarget *pqt;
|
||||
VdpStatus ret;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating PresentationQueueTarget\n");
|
||||
|
||||
if (!drawable)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
||||
|
|
@ -142,8 +139,6 @@ vlVdpPresentationQueueTargetDestroy(VdpPresentationQueueTarget presentation_queu
|
|||
{
|
||||
vlVdpPresentationQueueTarget *pqt;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying PresentationQueueTarget\n");
|
||||
|
||||
pqt = vlGetDataHTAB(presentation_queue_target);
|
||||
if (!pqt)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -160,8 +155,6 @@ vlVdpPresentationQueueTargetDestroy(VdpPresentationQueueTarget presentation_queu
|
|||
VdpStatus
|
||||
vlVdpDeviceDestroy(VdpDevice device)
|
||||
{
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying device\n");
|
||||
|
||||
vlVdpDevice *dev = vlGetDataHTAB(device);
|
||||
if (!dev)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -173,8 +166,6 @@ vlVdpDeviceDestroy(VdpDevice device)
|
|||
FREE(dev);
|
||||
vlDestroyHTAB();
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Device destroyed successfully\n");
|
||||
|
||||
return VDP_STATUS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,8 +52,6 @@ vlVdpVideoMixerCreate(VdpDevice device,
|
|||
unsigned max_width, max_height, i;
|
||||
enum pipe_video_profile prof = PIPE_VIDEO_PROFILE_UNKNOWN;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating VideoMixer\n");
|
||||
|
||||
vlVdpDevice *dev = vlGetDataHTAB(device);
|
||||
if (!dev)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -128,19 +126,19 @@ vlVdpVideoMixerCreate(VdpDevice device,
|
|||
}
|
||||
ret = VDP_STATUS_INVALID_VALUE;
|
||||
if (vmixer->max_layers > 4) {
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Max layers > 4 not supported\n", vmixer->max_layers);
|
||||
VDPAU_MSG(VDPAU_WARN, "[VDPAU] Max layers > 4 not supported\n", vmixer->max_layers);
|
||||
goto no_params;
|
||||
}
|
||||
max_width = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_WIDTH);
|
||||
max_height = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_HEIGHT);
|
||||
if (vmixer->video_width < 48 ||
|
||||
vmixer->video_width > max_width) {
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] 48 < %u < %u not valid for width\n", vmixer->video_width, max_width);
|
||||
VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for width\n", vmixer->video_width, max_width);
|
||||
goto no_params;
|
||||
}
|
||||
if (vmixer->video_height < 48 ||
|
||||
vmixer->video_height > max_height) {
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] 48 < %u < %u not valid for height\n", vmixer->video_height, max_height);
|
||||
VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for height\n", vmixer->video_height, max_height);
|
||||
goto no_params;
|
||||
}
|
||||
vmixer->luma_key_min = 0.f;
|
||||
|
|
@ -164,8 +162,6 @@ vlVdpVideoMixerDestroy(VdpVideoMixer mixer)
|
|||
{
|
||||
vlVdpVideoMixer *vmixer;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying VideoMixer\n");
|
||||
|
||||
vmixer = vlGetDataHTAB(mixer);
|
||||
if (!vmixer)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
|
|||
|
||||
vlVdpOutputSurface *vlsurface = NULL;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating output surface\n");
|
||||
if (!(width && height))
|
||||
return VDP_STATUS_INVALID_SIZE;
|
||||
|
||||
|
|
@ -127,8 +126,6 @@ vlVdpOutputSurfaceDestroy(VdpOutputSurface surface)
|
|||
{
|
||||
vlVdpOutputSurface *vlsurface;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying output surface\n");
|
||||
|
||||
vlsurface = vlGetDataHTAB(surface);
|
||||
if (!vlsurface)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -152,8 +149,6 @@ vlVdpOutputSurfaceGetParameters(VdpOutputSurface surface,
|
|||
{
|
||||
vlVdpOutputSurface *vlsurface;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Getting output surface parameters\n");
|
||||
|
||||
vlsurface = vlGetDataHTAB(surface);
|
||||
if (!vlsurface)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -218,8 +213,6 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface,
|
|||
struct pipe_box box;
|
||||
struct pipe_video_rect dst_rect;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Uploading indexed output surface\n");
|
||||
|
||||
vlsurface = vlGetDataHTAB(surface);
|
||||
if (!vlsurface)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -455,8 +448,6 @@ vlVdpOutputSurfaceRenderOutputSurface(VdpOutputSurface destination_surface,
|
|||
|
||||
void *blend;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Composing output surfaces\n");
|
||||
|
||||
dst_vlsurface = vlGetDataHTAB(destination_surface);
|
||||
if (!dst_vlsurface)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@ vlVdpPresentationQueueCreate(VdpDevice device,
|
|||
vlVdpPresentationQueue *pq = NULL;
|
||||
VdpStatus ret;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating PresentationQueue\n");
|
||||
|
||||
if (!presentation_queue)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -99,8 +97,6 @@ vlVdpPresentationQueueDestroy(VdpPresentationQueue presentation_queue)
|
|||
{
|
||||
vlVdpPresentationQueue *pq;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying PresentationQueue\n");
|
||||
|
||||
pq = vlGetDataHTAB(presentation_queue);
|
||||
if (!pq)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -123,8 +119,6 @@ vlVdpPresentationQueueSetBackgroundColor(VdpPresentationQueue presentation_queue
|
|||
vlVdpPresentationQueue *pq;
|
||||
union pipe_color_union color;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Setting background color\n");
|
||||
|
||||
if (!background_color)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -152,8 +146,6 @@ vlVdpPresentationQueueGetBackgroundColor(VdpPresentationQueue presentation_queue
|
|||
vlVdpPresentationQueue *pq;
|
||||
union pipe_color_union color;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Getting background color\n");
|
||||
|
||||
if (!background_color)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -181,8 +173,6 @@ vlVdpPresentationQueueGetTime(VdpPresentationQueue presentation_queue,
|
|||
vlVdpPresentationQueue *pq;
|
||||
struct timespec ts;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Getting queue time\n");
|
||||
|
||||
if (!current_time)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -266,7 +256,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
|
|||
|
||||
sprintf(cmd, "xwd -id %d -out vdpau_frame_%08d.xwd", (int)pq->drawable, ++framenum);
|
||||
if (system(cmd) != 0)
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Dumping surface %d failed.\n", surface);
|
||||
VDPAU_MSG(VDPAU_ERR, "[VDPAU] Dumping surface %d failed.\n", surface);
|
||||
}
|
||||
|
||||
pipe_surface_reference(&drawable_surface, NULL);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ vlVdpVideoSurfaceQueryCapabilities(VdpDevice device, VdpChromaType surface_chrom
|
|||
struct pipe_screen *pscreen;
|
||||
uint32_t max_2d_texture_level;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpVideoSurface capabilities\n");
|
||||
|
||||
if (!(is_supported && max_width && max_height))
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -111,8 +109,6 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
|
|||
vlVdpDevice *dev;
|
||||
struct pipe_screen *pscreen;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpVideoSurface get/put bits YCbCr capabilities\n");
|
||||
|
||||
if (!is_supported)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -146,8 +142,6 @@ vlVdpDecoderQueryCapabilities(VdpDevice device, VdpDecoderProfile profile,
|
|||
struct pipe_screen *pscreen;
|
||||
enum pipe_video_profile p_profile;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpDecoder capabilities\n");
|
||||
|
||||
if (!(is_supported && max_level && max_macroblocks && max_width && max_height))
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -192,8 +186,6 @@ vlVdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba
|
|||
struct pipe_screen *pscreen;
|
||||
enum pipe_format format;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface capabilities\n");
|
||||
|
||||
dev = vlGetDataHTAB(device);
|
||||
if (!dev)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
|
@ -238,8 +230,6 @@ VdpStatus
|
|||
vlVdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
|
||||
VdpBool *is_supported)
|
||||
{
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface get/put bits native capabilities\n");
|
||||
|
||||
if (!is_supported)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -257,8 +247,6 @@ vlVdpOutputSurfaceQueryPutBitsIndexedCapabilities(VdpDevice device,
|
|||
VdpColorTableFormat color_table_format,
|
||||
VdpBool *is_supported)
|
||||
{
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface put bits indexed capabilities\n");
|
||||
|
||||
if (!is_supported)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -274,8 +262,6 @@ vlVdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat
|
|||
VdpYCbCrFormat bits_ycbcr_format,
|
||||
VdpBool *is_supported)
|
||||
{
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface put bits YCbCr capabilities\n");
|
||||
|
||||
if (!is_supported)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
@ -289,8 +275,6 @@ VdpStatus
|
|||
vlVdpBitmapSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
|
||||
VdpBool *is_supported, uint32_t *max_width, uint32_t *max_height)
|
||||
{
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpBitmapSurface capabilities\n");
|
||||
|
||||
if (!(is_supported && max_width && max_height))
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
|
|||
vlVdpSurface *p_surf;
|
||||
VdpStatus ret;
|
||||
|
||||
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating a surface\n");
|
||||
|
||||
if (!(width && height)) {
|
||||
ret = VDP_STATUS_INVALID_SIZE;
|
||||
goto inv_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue