st/vdpau: Various whitespace cleanups found while reading some code
authorEmeric Grange <emeric.grange@gmail.com>
Mon, 12 Sep 2011 21:39:29 +0000 (23:39 +0200)
committerChristian König <deathsimple@vodafone.de>
Wed, 14 Sep 2011 13:49:16 +0000 (15:49 +0200)
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
src/gallium/state_trackers/vdpau/bitmap.c
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/vdpau/device.c
src/gallium/state_trackers/vdpau/ftab.c
src/gallium/state_trackers/vdpau/mixer.c
src/gallium/state_trackers/vdpau/output.c
src/gallium/state_trackers/vdpau/preemption.c
src/gallium/state_trackers/vdpau/presentation.c
src/gallium/state_trackers/vdpau/vdpau_private.h

index e336568df479c626ffcec58e8f28e4fdaab8ae6a..730cc11cb8252145532aa0d6e7c0e69caf56218d 100644 (file)
@@ -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;
 }
index 35011669cf221469249572d25e7ab5280f76b62a..719f8d8d0d485512f5fd0dd581102802ebf9bd5a 100644 (file)
@@ -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:
index 25fa8d88844ab2ce30b87504a3a8a20f014ab40f..77dacf42a1becb13a0da71164b31bb9106d5e834 100644 (file)
@@ -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.");
index 66ed50c329971ca165cfd95aeb2270b589993e4d..81d16ec306a98e06aed709fdb3d1a8756e291b29 100644 (file)
@@ -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;
index 8530b7d4a1d1c9efa20df428b2932c19476d075b..11baffc1e0ac86cff8e671cece98853ceadb3668 100644 (file)
@@ -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;
 }
index 1736eb942fbb3a3ebbe5414565d7efffb9b3af2f..9392f4856b1e7407b11e76cd3069edf1d3410d67 100644 (file)
@@ -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:
index fa70bb09cbc37550b8d55e28bccb2673d17b5c29..75933c113291b75c0a4e7d591b2cffeabf539045 100644 (file)
  *
  **************************************************************************/
 
- #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;
- }
+}
index 4417d71271bd0d11116adcdd9c558b7547561a2a..ba5a15a3f634112fcdda767a108e4a7124676421 100644 (file)
@@ -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;
index 705b57e72c0aeadf0324e7003304059634d3aada..c43fdfdac9b2f996ac2e061d0280a2f777a540b1 100644 (file)
@@ -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 */