[FFmpeg-devel] [PATCH] vdpau: write pointer types in a consistent way

Reimar Döffinger Reimar.Doeffinger
Sat Feb 14 23:21:33 CET 2009


Hello,
I can't help but feel a pain in my eye when I see such an inconsistent
style. Any objections?

Greetings,
Reimar D?ffinger
-------------- next part --------------
Index: libavcodec/vdpau.c
===================================================================
--- libavcodec/vdpau.c	(revision 17280)
+++ libavcodec/vdpau.c	(working copy)
@@ -41,12 +41,12 @@
 void ff_vdpau_h264_set_reference_frames(MpegEncContext *s)
 {
     H264Context *h = s->avctx->priv_data;
-    struct vdpau_render_state * render, * render_ref;
-    VdpReferenceFrameH264 * rf, * rf2;
-    Picture * pic;
+    struct vdpau_render_state *render, *render_ref;
+    VdpReferenceFrameH264 *rf, *rf2;
+    Picture *pic;
     int i, list, pic_frame_idx;
 
-    render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];
+    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
     assert(render);
 
     rf = &render->info.h264.referenceFrames[0];
@@ -62,7 +62,7 @@
                 continue;
             pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num;
 
-            render_ref = (struct vdpau_render_state*)pic->data[0];
+            render_ref = (struct vdpau_render_state *)pic->data[0];
             assert(render_ref);
 
             rf2 = &render->info.h264.referenceFrames[0];
@@ -110,9 +110,9 @@
 void ff_vdpau_add_data_chunk(MpegEncContext *s,
                              const uint8_t *buf, int buf_size)
 {
-    struct vdpau_render_state * render;
+    struct vdpau_render_state *render;
 
-    render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];
+    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
     assert(render);
 
     render->bitstream_buffers= av_fast_realloc(
@@ -130,9 +130,9 @@
 void ff_vdpau_h264_picture_complete(MpegEncContext *s)
 {
     H264Context *h = s->avctx->priv_data;
-    struct vdpau_render_state * render;
+    struct vdpau_render_state *render;
 
-    render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];
+    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
     assert(render);
 
     render->info.h264.slice_count = h->slice_num;
@@ -181,10 +181,10 @@
 void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf,
                                     int buf_size, int slice_count)
 {
-    struct vdpau_render_state * render, * last, * next;
+    struct vdpau_render_state *render, *last, *next;
     int i;
 
-    render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];
+    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
     assert(render);
 
     /* fill VdpPictureInfoMPEG1Or2 struct */
@@ -213,12 +213,12 @@
 
     switch(s->pict_type){
     case  FF_B_TYPE:
-        next = (struct vdpau_render_state*)s->next_picture.data[0];
+        next = (struct vdpau_render_state *)s->next_picture.data[0];
         assert(next);
         render->info.mpeg.backward_reference     = next->surface;
         // no return here, going to set forward prediction
     case  FF_P_TYPE:
-        last = (struct vdpau_render_state*)s->last_picture.data[0];
+        last = (struct vdpau_render_state *)s->last_picture.data[0];
         if (!last) // FIXME: Does this test make sense?
             last = render; // predict second field from the first
         render->info.mpeg.forward_reference      = last->surface;
@@ -237,9 +237,9 @@
                                  int buf_size)
 {
     VC1Context *v = s->avctx->priv_data;
-    struct vdpau_render_state * render, * last, * next;
+    struct vdpau_render_state *render, *last, *next;
 
-    render = (struct vdpau_render_state*)s->current_picture.data[0];
+    render = (struct vdpau_render_state *)s->current_picture.data[0];
     assert(render);
 
     /*  fill LvPictureInfoVC1 struct */
@@ -283,12 +283,12 @@
 
     switch(s->pict_type){
     case  FF_B_TYPE:
-        next = (struct vdpau_render_state*)s->next_picture.data[0];
+        next = (struct vdpau_render_state *)s->next_picture.data[0];
         assert(next);
         render->info.vc1.backward_reference = next->surface;
         // no break here, going to set forward prediction
     case  FF_P_TYPE:
-        last = (struct vdpau_render_state*)s->last_picture.data[0];
+        last = (struct vdpau_render_state *)s->last_picture.data[0];
         if (!last) // FIXME: Does this test make sense?
             last = render; // predict second field from the first
         render->info.vc1.forward_reference = last->surface;



More information about the ffmpeg-devel mailing list