diff options
author | Emeric Grange <[email protected]> | 2011-09-12 23:39:29 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-09-14 15:49:16 +0200 |
commit | c24bc6f8684abee8c9a1b263334cd7a8506657b1 (patch) | |
tree | 4cf3ac9347e521f63350c0778bca9ec8f4778499 /src/gallium/state_trackers | |
parent | 87e84a2dbfb5ee330d4d5594963d7f8b507f9984 (diff) |
st/vdpau: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/vdpau/bitmap.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/decode.c | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/device.c | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/ftab.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/preemption.c | 17 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/presentation.c | 7 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/vdpau_private.h | 13 |
9 files changed, 34 insertions, 33 deletions
diff --git a/src/gallium/state_trackers/vdpau/bitmap.c b/src/gallium/state_trackers/vdpau/bitmap.c index e336568df47..730cc11cb82 100644 --- a/src/gallium/state_trackers/vdpau/bitmap.c +++ b/src/gallium/state_trackers/vdpau/bitmap.c @@ -65,10 +65,10 @@ VdpStatus vlVdpBitmapSurfacePutBitsNative(VdpBitmapSurface surface, void const *const *source_data, uint32_t const *source_pitches, - VdpRect const *destination_rect ) + VdpRect const *destination_rect) { if (!(source_data && source_pitches && destination_rect)) - return VDP_STATUS_INVALID_POINTER; + return VDP_STATUS_INVALID_POINTER; return VDP_STATUS_NO_IMPLEMENTATION; } diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 35011669cf2..719f8d8d0d4 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -167,11 +167,11 @@ vlVdpDecoderGetParameters(VdpDecoder decoder, vldecoder = (vlVdpDecoder *)vlGetDataHTAB(decoder); if (!vldecoder) return VDP_STATUS_INVALID_HANDLE; - + *profile = PipeToProfile(vldecoder->decoder->profile); *width = vldecoder->decoder->width; *height = vldecoder->decoder->height; - + return VDP_STATUS_OK; } @@ -273,7 +273,7 @@ vlVdpDecoderRender(VdpDecoder decoder, return VDP_STATUS_INVALID_CHROMA_TYPE; // TODO: Right now only mpeg 1 & 2 is supported. - switch (vldecoder->decoder->profile) { + switch (vldecoder->decoder->profile) { case PIPE_VIDEO_PROFILE_MPEG1: case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE: case PIPE_VIDEO_PROFILE_MPEG2_MAIN: diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index 25fa8d88844..77dacf42a1b 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -194,8 +194,8 @@ vlVdpGetErrorString (VdpStatus status) _ERROR_TYPE(VDP_STATUS_NO_IMPLEMENTATION,"No backend implementation could be loaded."); _ERROR_TYPE(VDP_STATUS_DISPLAY_PREEMPTED,"The display was preempted, or a fatal error occurred. The application must re-initialize VDPAU."); _ERROR_TYPE(VDP_STATUS_INVALID_HANDLE,"An invalid handle value was provided. Either the handle does not exist at all, or refers to an object of an incorrect type."); - _ERROR_TYPE(VDP_STATUS_INVALID_POINTER ,"An invalid pointer was provided. Typically, this means that a NULL pointer was provided for an 'output' parameter."); - _ERROR_TYPE(VDP_STATUS_INVALID_CHROMA_TYPE ,"An invalid/unsupported VdpChromaType value was supplied."); + _ERROR_TYPE(VDP_STATUS_INVALID_POINTER,"An invalid pointer was provided. Typically, this means that a NULL pointer was provided for an 'output' parameter."); + _ERROR_TYPE(VDP_STATUS_INVALID_CHROMA_TYPE,"An invalid/unsupported VdpChromaType value was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_Y_CB_CR_FORMAT,"An invalid/unsupported VdpYCbCrFormat value was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_RGBA_FORMAT,"An invalid/unsupported VdpRGBAFormat value was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_INDEXED_FORMAT,"An invalid/unsupported VdpIndexedFormat value was supplied."); @@ -206,7 +206,7 @@ vlVdpGetErrorString (VdpStatus status) _ERROR_TYPE(VDP_STATUS_INVALID_FLAG,"An invalid/unsupported flag value/combination was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_DECODER_PROFILE,"An invalid/unsupported VdpDecoderProfile value was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE,"An invalid/unsupported VdpVideoMixerFeature value was supplied."); - _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER ,"An invalid/unsupported VdpVideoMixerParameter value was supplied."); + _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER,"An invalid/unsupported VdpVideoMixerParameter value was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE,"An invalid/unsupported VdpVideoMixerAttribute value was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE,"An invalid/unsupported VdpVideoMixerPictureStructure value was supplied."); _ERROR_TYPE(VDP_STATUS_INVALID_FUNC_ID,"An invalid/unsupported VdpFuncId value was supplied."); diff --git a/src/gallium/state_trackers/vdpau/ftab.c b/src/gallium/state_trackers/vdpau/ftab.c index 66ed50c3299..81d16ec306a 100644 --- a/src/gallium/state_trackers/vdpau/ftab.c +++ b/src/gallium/state_trackers/vdpau/ftab.c @@ -115,7 +115,7 @@ boolean vlGetFuncFTAB(VdpFuncId function_id, void **func) else { function_id -= VDP_FUNC_ID_BASE_WINSYS; if (function_id > 0) - return FALSE; + return FALSE; *func = ftab_winsys[function_id]; } return *func != NULL; diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index 8530b7d4a1d..11baffc1e0a 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -70,7 +70,7 @@ vlVdpVideoMixerCreate(VdpDevice device, /* * TODO: Handle features and parameters - * */ + */ *mixer = vlAddDataHTAB(vmixer); if (*mixer == 0) { @@ -79,6 +79,7 @@ vlVdpVideoMixerCreate(VdpDevice device, } return VDP_STATUS_OK; + no_handle: return ret; } @@ -118,7 +119,7 @@ vlVdpVideoMixerSetFeatureEnables(VdpVideoMixer mixer, /* * TODO: Set features - * */ + */ return VDP_STATUS_OK; } @@ -180,8 +181,7 @@ vlVdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, /* * TODO: Implement the function - * - * */ + */ return VDP_STATUS_OK; } diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 1736eb942fb..9392f4856b1 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -318,7 +318,7 @@ vlVdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface, static unsigned BlendFactorToPipe(VdpOutputSurfaceRenderBlendFactor factor) { - switch(factor) { + switch (factor) { case VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO: return PIPE_BLENDFACTOR_ZERO; case VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE: @@ -358,7 +358,7 @@ BlendFactorToPipe(VdpOutputSurfaceRenderBlendFactor factor) static unsigned BlendEquationToPipe(VdpOutputSurfaceRenderBlendEquation equation) { - switch(equation) { + switch (equation) { case VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_SUBTRACT: return PIPE_BLEND_SUBTRACT; case VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_REVERSE_SUBTRACT: diff --git a/src/gallium/state_trackers/vdpau/preemption.c b/src/gallium/state_trackers/vdpau/preemption.c index fa70bb09cbc..75933c11329 100644 --- a/src/gallium/state_trackers/vdpau/preemption.c +++ b/src/gallium/state_trackers/vdpau/preemption.c @@ -25,15 +25,16 @@ * **************************************************************************/ - #include <vdpau/vdpau.h> +#include <vdpau/vdpau.h> - void vlVdpPreemptionCallback(VdpDevice device, void *context) - { +void vlVdpPreemptionCallback(VdpDevice device, void *context) +{ /* TODO: Implement preemption */ - } +} - VdpStatus vlVdpPreemptionCallbackRegister(VdpDevice device, VdpPreemptionCallback callback, - void *context) - { +VdpStatus vlVdpPreemptionCallbackRegister(VdpDevice device, + VdpPreemptionCallback callback, + void *context) +{ return VDP_STATUS_OK; - } +} diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index 4417d71271b..ba5a15a3f63 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -77,6 +77,7 @@ vlVdpPresentationQueueCreate(VdpDevice device, } return VDP_STATUS_OK; + no_handle: no_compositor: FREE(pq); @@ -179,11 +180,11 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vl_contextprivate_get(pq->device->context, drawable_surface) ); - if(dump_window == -1) { + if (dump_window == -1) { dump_window = debug_get_num_option("VDPAU_DUMP", 0); } - if(dump_window) { + if (dump_window) { static unsigned int framenum = 0; char cmd[256]; @@ -191,7 +192,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, if (system(cmd) != 0) VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Dumping surface %d failed.\n", surface); } - + pipe_surface_reference(&drawable_surface, NULL); return VDP_STATUS_OK; diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h index 705b57e72c0..c43fdfdac9b 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -81,7 +81,6 @@ PipeToChroma(enum pipe_video_chroma_format pipe_type) return -1; } - static inline enum pipe_format FormatYCBCRToPipe(VdpYCbCrFormat vdpau_format) { @@ -198,10 +197,10 @@ FormatColorTableToPipe(VdpColorTableFormat vdpau_format) default: assert(0); } + return PIPE_FORMAT_NONE; } - static inline enum pipe_video_profile ProfileToPipe(VdpDecoderProfile vdpau_profile) { @@ -214,10 +213,10 @@ ProfileToPipe(VdpDecoderProfile vdpau_profile) return PIPE_VIDEO_PROFILE_MPEG2_MAIN; case VDP_DECODER_PROFILE_H264_BASELINE: return PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE; - case VDP_DECODER_PROFILE_H264_MAIN: /* Not defined in p_format.h */ + case VDP_DECODER_PROFILE_H264_MAIN: return PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN; case VDP_DECODER_PROFILE_H264_HIGH: - return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH; + return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH; default: return PIPE_VIDEO_PROFILE_UNKNOWN; } @@ -235,10 +234,10 @@ PipeToProfile(enum pipe_video_profile p_profile) return VDP_DECODER_PROFILE_MPEG2_MAIN; case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE: return VDP_DECODER_PROFILE_H264_BASELINE; - case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN: /* Not defined in p_format.h */ + case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN: return VDP_DECODER_PROFILE_H264_MAIN; case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH: - return VDP_DECODER_PROFILE_H264_HIGH; + return VDP_DECODER_PROFILE_H264_HIGH; default: assert(0); return -1; @@ -404,4 +403,4 @@ static inline void VDPAU_MSG(unsigned int level, const char *fmt, ...) } } -#endif // VDPAU_PRIVATE_H +#endif /* VDPAU_PRIVATE_H */ |