Remove vlc_memset
authorRafaël Carré <funman@videolan.org>
Mon, 2 Jul 2012 11:10:56 +0000 (13:10 +0200)
committerRafaël Carré <funman@videolan.org>
Mon, 2 Jul 2012 11:10:56 +0000 (13:10 +0200)
19 files changed:
include/vlc_common.h
modules/access/linsys/linsys_sdi.c
modules/audio_filter/converter/a52tospdif.c
modules/audio_filter/converter/dtstospdif.c
modules/audio_output/audioqueue.c
modules/audio_output/auhal.c
modules/audio_output/kai.c
modules/audio_output/packet.c
modules/audio_output/waveout.c
modules/video_chroma/i422_i420.c
modules/video_filter/bluescreen.c
modules/video_filter/croppadd.c
modules/video_filter/gradient.c
modules/video_filter/magnify.c
modules/video_filter/panoramix.c
modules/video_filter/psychedelic.c
modules/video_filter/ripple.c
modules/video_filter/sepia.c
modules/video_filter/wave.c

index 6ca9927..1998d9c 100644 (file)
@@ -881,9 +881,8 @@ static inline void *vlc_memalign(size_t align, size_t size)
 
 VLC_API void vlc_tdestroy( void *, void (*)(void *) );
 
-/* Fast large memory copy and memory set */
+/* Fast large memory copy */
 VLC_API void * vlc_memcpy( void *, const void *, size_t );
-#define vlc_memset memset
 
 /*****************************************************************************
  * I18n stuff
index 9f8388e..c4b4901 100644 (file)
@@ -975,8 +975,8 @@ static int DecodeFrame( demux_t *p_demux )
         {
             /* For PAL, erase first half of line 23, last half of line 623,
              * and line 624 ; no need to erase chrominance */
-            vlc_memset( p_sys->p_y, 0, p_sys->i_width / 2 );
-            vlc_memset( p_sys->p_y + p_sys->i_width * 574 + p_sys->i_width / 2,
+            memset( p_sys->p_y, 0, p_sys->i_width / 2 );
+            memset( p_sys->p_y + p_sys->i_width * 574 + p_sys->i_width / 2,
                         0, p_sys->i_width * 3 / 2 );
         }
     }
index 4fd14ab..dc82580 100644 (file)
@@ -106,7 +106,7 @@ static block_t *DoWork( filter_t * p_filter, block_t *p_in_buf )
         SetWLE( p_out + 6, i_frame_size << 4 );
         swab( p_in, &p_out[8], i_frame_size * 2 );
     }
-    vlc_memset( p_out + 8 + i_frame_size * 2, 0,
+    memset( p_out + 8 + i_frame_size * 2, 0,
                 AOUT_SPDIF_SIZE - i_frame_size * 2 - 8 );
 
     p_out_buf->i_dts = p_in_buf->i_dts;
index 19cb432..c842a58 100644 (file)
@@ -205,7 +205,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
 
         if( i_fz > i_length + 8 )
         {
-            vlc_memset( p_out + 8 + i_length_padded, 0,
+            memset( p_out + 8 + i_length_padded, 0,
                         i_fz - i_length_padded - 8 );
         }
     }
index 9ef9af3..bc06958 100644 (file)
@@ -186,7 +186,7 @@ void AudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferR
         inBuffer->mAudioDataByteSize = p_buffer->i_buffer;
         block_Release( p_buffer );
     } else {
-        vlc_memset( inBuffer->mAudioData, 0, inBuffer->mAudioDataBytesCapacity );
+        memset( inBuffer->mAudioData, 0, inBuffer->mAudioDataBytesCapacity );
         inBuffer->mAudioDataByteSize = inBuffer->mAudioDataBytesCapacity;
     }
     AudioQueueEnqueueBuffer(inAQ, inBuffer, 0, NULL);
index ee49456..d67fc1d 100644 (file)
@@ -1334,7 +1334,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
         }
         else
         {
-             vlc_memset( (uint8_t *)ioData->mBuffers[0].mData +i_mData_bytes,
+             memset( (uint8_t *)ioData->mBuffers[0].mData +i_mData_bytes,
                          0,ioData->mBuffers[0].mDataByteSize - i_mData_bytes );
              i_mData_bytes += ioData->mBuffers[0].mDataByteSize - i_mData_bytes;
         }
@@ -1386,7 +1386,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
     }
     else
     {
-        vlc_memset( BUFFER.mData, 0, BUFFER.mDataByteSize );
+        memset( BUFFER.mData, 0, BUFFER.mDataByteSize );
     }
 #undef BUFFER
 
index 53cbc13..37c0e00 100644 (file)
@@ -328,7 +328,7 @@ static ULONG APIENTRY KaiCallback( PVOID p_cb_data,
         }
         else
         {
-            vlc_memset( ( uint8_t * ) p_buffer + i_len, 0, i_buf_size - i_len );
+            memset( ( uint8_t * ) p_buffer + i_len, 0, i_buf_size - i_len );
 
             i_len = i_buf_size;
         }
index e890edc..6ea6006 100644 (file)
@@ -270,7 +270,7 @@ static block_t *aout_OutputSlice (audio_output_t *p_aout)
             if( unlikely(p_inbuf == NULL) )
             {
                 msg_Err( p_aout, "packetization error" );
-                vlc_memset( p_out, 0, needed );
+                memset( p_out, 0, needed );
                 break;
             }
 
index 97f2919..cfd17d2 100644 (file)
@@ -765,7 +765,7 @@ static int PlayWaveOut( audio_output_t *p_aout, HWAVEOUT h_waveout,
            p_aout->sys->i_repeat_counter--;
            if(!p_aout->sys->i_repeat_counter)
            {
-               vlc_memset( p_aout->sys->p_silence_buffer,
+               memset( p_aout->sys->p_silence_buffer,
                            0x00, p_aout->sys->i_buffer_size );
            }
         }
index c929167..b019dfb 100644 (file)
@@ -177,6 +177,6 @@ static void I422_YUVA( filter_t *p_filter, picture_t *p_source,
                                            picture_t *p_dest )
 {
     I422_I420( p_filter, p_source, p_dest );
-    vlc_memset( p_dest->p[A_PLANE].p_pixels, 0xff,
+    memset( p_dest->p[A_PLANE].p_pixels, 0xff,
                 p_dest->p[A_PLANE].i_lines * p_dest->p[A_PLANE].i_pitch );
 }
index 3d5828e..4d3d50b 100644 (file)
@@ -209,7 +209,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         }
     }
     /* Gaussian convolution to make it look cleaner */
-    vlc_memset( p_a, 0, 2 * i_pitch );
+    memset( p_a, 0, 2 * i_pitch );
     for( i = 2; i < i_lines - 2; i++ )
     {
         p_a[i*i_pitch] = 0x00;
index 3072637..4e4869e 100644 (file)
@@ -266,7 +266,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         p_in += i_ycrop * p_plane->i_pitch;
 
         /* Padd on the top */
-        vlc_memset( p_out, i_padd_color, i_ypadd * p_outplane->i_pitch );
+        memset( p_out, i_padd_color, i_ypadd * p_outplane->i_pitch );
         p_out += i_ypadd * p_outplane->i_pitch;
 
         int i_line;
@@ -279,7 +279,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
             p_in += i_xcrop * i_pixel_pitch;
 
             /* Padd on the left */
-            vlc_memset( p_out, i_padd_color, i_xpadd * i_pixel_pitch );
+            memset( p_out, i_padd_color, i_xpadd * i_pixel_pitch );
             p_out += i_xpadd * i_pixel_pitch;
 
             /* Copy the image and crop on the right */
@@ -288,7 +288,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
             p_in += i_width * i_pixel_pitch;
 
             /* Padd on the right */
-            vlc_memset( p_out, i_padd_color,
+            memset( p_out, i_padd_color,
                         ( i_outwidth - i_xpadd - i_width ) * i_pixel_pitch );
 
             /* Got to begining of the next line */
@@ -297,7 +297,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         }
 
         /* Padd on the bottom */
-        vlc_memset( p_out, i_padd_color,
+        memset( p_out, i_padd_color,
                  ( i_outheight - i_ypadd - i_height ) * p_outplane->i_pitch );
     }
 
index 77b4387..fafc63f 100644 (file)
@@ -365,9 +365,9 @@ static void FilterGradient( filter_t *p_filter, picture_t *p_inpic,
     }
     else
     {
-        vlc_memset( p_outpic->p[U_PLANE].p_pixels, 0x80,
+        memset( p_outpic->p[U_PLANE].p_pixels, 0x80,
             p_outpic->p[U_PLANE].i_lines * p_outpic->p[U_PLANE].i_pitch );
-        vlc_memset( p_outpic->p[V_PLANE].p_pixels, 0x80,
+        memset( p_outpic->p[V_PLANE].p_pixels, 0x80,
             p_outpic->p[V_PLANE].i_lines * p_outpic->p[V_PLANE].i_pitch );
     }
 
@@ -505,11 +505,11 @@ static void FilterEdge( filter_t *p_filter, picture_t *p_inpic,
     }
     else
     {
-        vlc_memset( p_outpic->p[Y_PLANE].p_pixels, 0xff,
+        memset( p_outpic->p[Y_PLANE].p_pixels, 0xff,
               p_outpic->p[Y_PLANE].i_lines * p_outpic->p[Y_PLANE].i_pitch );
-        vlc_memset( p_outpic->p[U_PLANE].p_pixels, 0x80,
+        memset( p_outpic->p[U_PLANE].p_pixels, 0x80,
             p_outpic->p[U_PLANE].i_lines * p_outpic->p[U_PLANE].i_pitch );
-        vlc_memset( p_outpic->p[V_PLANE].p_pixels, 0x80,
+        memset( p_outpic->p[V_PLANE].p_pixels, 0x80,
             p_outpic->p[V_PLANE].i_lines * p_outpic->p[V_PLANE].i_pitch );
     }
 
@@ -677,7 +677,7 @@ static void FilterHough( filter_t *p_filter, picture_t *p_inpic,
         msg_Dbg(p_filter, "Precalculation done");
     }
 
-    vlc_memset( p_hough, 0, i_diag * i_nb_steps * sizeof(int) );
+    memset( p_hough, 0, i_diag * i_nb_steps * sizeof(int) );
 
     plane_CopyPixels( &p_outpic->p[Y_PLANE], &p_inpic->p[Y_PLANE] );
     plane_CopyPixels( &p_outpic->p[U_PLANE], &p_inpic->p[U_PLANE] );
index cb8e870..ae5b0e3 100644 (file)
@@ -317,7 +317,7 @@ static void DrawRectangle( uint8_t *pb_dst, int i_pitch, int i_width, int i_heig
         return;
 
     /* top line */
-    vlc_memset( &pb_dst[y * i_pitch + x], 0xff, i_w );
+    memset( &pb_dst[y * i_pitch + x], 0xff, i_w );
 
     /* left and right */
     for( dy = 1; dy < i_h-1; dy++ )
@@ -327,7 +327,7 @@ static void DrawRectangle( uint8_t *pb_dst, int i_pitch, int i_width, int i_heig
     }
 
     /* bottom line */
-    vlc_memset( &pb_dst[(y+i_h-1) * i_pitch + x], 0xff, i_w );
+    memset( &pb_dst[(y+i_h-1) * i_pitch + x], 0xff, i_w );
 }
 
 static int Mouse( filter_t *p_filter, vlc_mouse_t *p_mouse, const vlc_mouse_t *p_old, const vlc_mouse_t *p_new )
index e8e8664..25def0e 100644 (file)
@@ -983,7 +983,7 @@ static void FilterPlanar( uint8_t *p_out, int i_out_pitch,
     /* Top black border */
     for( int b = 0; b < p_cfg->black.i_top; b++ )
     {
-        vlc_memset( p_out, i_pixel_black, i_out_width );
+        memset( p_out, i_pixel_black, i_out_width );
         p_out += i_out_pitch;
     }
 
@@ -1036,7 +1036,7 @@ static void FilterPlanar( uint8_t *p_out, int i_out_pitch,
     /* Bottom black border */
     for( int b = 0; b < p_cfg->black.i_bottom; b++ )
     {
-        vlc_memset( p_out, i_pixel_black, i_out_width );
+        memset( p_out, i_pixel_black, i_out_width );
         p_out += i_out_pitch;
     }
 }
index 95f1feb..9484ac5 100644 (file)
@@ -164,10 +164,10 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     v = p_filter->p_sys->v;
     for( y = 0; y<p_outpic->p[U_PLANE].i_lines; y++)
     {
-        vlc_memset(
+        memset(
                 p_outpic->p[U_PLANE].p_pixels+y*p_outpic->p[U_PLANE].i_pitch,
                 u, p_outpic->p[U_PLANE].i_pitch );
-        vlc_memset(
+        memset(
                 p_outpic->p[V_PLANE].p_pixels+y*p_outpic->p[V_PLANE].i_pitch,
                 v, p_outpic->p[V_PLANE].i_pitch );
         if( v == 0 && u != 0 )
index 55d7862..a7ae19d 100644 (file)
@@ -185,13 +185,13 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
                                 p_pic->p[i_index].i_visible_pitch + i_offset );
                     p_in -= p_pic->p[i_index].i_pitch;
                     p_out += p_outpic->p[i_index].i_pitch;
-                    vlc_memset( p_out + i_offset, black_pixel, -i_offset );
+                    memset( p_out + i_offset, black_pixel, -i_offset );
                 }
                 else
                 {
                     vlc_memcpy( p_out + i_offset, p_in,
                                 p_pic->p[i_index].i_visible_pitch - i_offset );
-                    vlc_memset( p_out, black_pixel, i_offset );
+                    memset( p_out, black_pixel, i_offset );
                     p_in -= p_pic->p[i_index].i_pitch;
                     p_out += p_outpic->p[i_index].i_pitch;
                 }
index cdab59e..052e70e 100644 (file)
@@ -286,10 +286,10 @@ static void PlanarI420Sepia( picture_t *p_pic, picture_t *p_outpic,
                     &p_pic->p[Y_PLANE].p_pixels[i_dy_line2_start + x + 8],
                     i_intensity_spread );
                 /* Copy precomputed values to destination memory location */
-                vlc_memset(
+                memset(
                     &p_outpic->p[U_PLANE].p_pixels[i_du_line_start + (x / 2)],
                     filling_const_8u, 8 );
-                vlc_memset(
+                memset(
                     &p_outpic->p[V_PLANE].p_pixels[i_dv_line_start + (x / 2)],
                     filling_const_8v, 8 );
             }
index 6ad3ac2..4838c77 100644 (file)
@@ -174,13 +174,13 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
                                 i_visible_pitch + i_offset );
                     p_in += p_pic->p[i_index].i_pitch;
                     p_out += p_outpic->p[i_index].i_pitch;
-                    vlc_memset( p_out + i_offset, black_pixel, -i_offset );
+                    memset( p_out + i_offset, black_pixel, -i_offset );
                 }
                 else
                 {
                     vlc_memcpy( p_out + i_offset, p_in,
                                 i_visible_pitch - i_offset );
-                    vlc_memset( p_out, black_pixel, i_offset );
+                    memset( p_out, black_pixel, i_offset );
                     p_in += p_pic->p[i_index].i_pitch;
                     p_out += p_outpic->p[i_index].i_pitch;
                 }