[vlc-devel] commit: Cleanup whitespace and use fastmemcpy. (Jean-Paul Saman )

git version control git at videolan.org
Tue Mar 25 12:02:13 CET 2008


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Mar 25 09:54:18 2008 +0100| [d2bd568bdfe7ebe702e698c79c6ea75a653d7b27]

Cleanup whitespace and use fastmemcpy.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2bd568bdfe7ebe702e698c79c6ea75a653d7b27
---

 modules/codec/faad.c |    9 +++++----
 modules/codec/x264.c |    4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 68f3e95..4f2bb9f 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -188,7 +188,7 @@ static int Open( vlc_object_t *p_this )
 
     /* buffer */
     p_sys->i_buffer = p_sys->i_buffer_size = 0;
-    p_sys->p_buffer = 0;
+    p_sys->p_buffer = NULL;
 
     p_sys->i_input_rate = INPUT_RATE_DEFAULT;
 
@@ -231,7 +231,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             /* FIXME: multiple blocks per frame */
             if( p_block->i_buffer > i_header_size )
             {
-                memcpy( p_block->p_buffer,
+                p_dec->p_libvlc->pf_memcpy( p_block->p_buffer,
                         p_block->p_buffer + i_header_size,
                         p_block->i_buffer - i_header_size );
                 p_block->i_buffer -= i_header_size;
@@ -246,9 +246,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         p_sys->p_buffer = realloc( p_sys->p_buffer, p_sys->i_buffer_size );
     }
 
-    if( p_block->i_buffer )
+    if( p_block->i_buffer > 0 )
     {
-        memcpy( &p_sys->p_buffer[p_sys->i_buffer],
+        p_dec->p_libvlc->pf_memcpy( &p_sys->p_buffer[p_sys->i_buffer],
                 p_block->p_buffer, p_block->i_buffer );
         p_sys->i_buffer += p_block->i_buffer;
         p_block->i_buffer = 0;
@@ -492,3 +492,4 @@ static void DoReordering( uint32_t *p_out, uint32_t *p_in, int i_samples,
                 ((uint16_t *)p_out)[i * i_nb_channels + pi_chan_table[j]] =
                     ((uint16_t *)p_in)[i * i_nb_channels + j];
 }
+
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index cdc84a7..4333c40 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -1351,7 +1351,7 @@ static void Close( vlc_object_t *p_this )
 {
     encoder_t     *p_enc = (encoder_t *)p_this;
     encoder_sys_t *p_sys = p_enc->p_sys;
- 
+
     free( p_sys->psz_stat_name );
 
     x264_encoder_close( p_sys->h );
@@ -1369,7 +1369,7 @@ static void Close( vlc_object_t *p_this )
     var_Set( p_enc->p_libvlc, "pthread_win32_count", count );
 
     if( count.i_int == 0 )
-    {   
+    {
         pthread_win32_thread_detach_np();
         pthread_win32_process_detach_np();
         msg_Dbg( p_enc, "pthread-win32 deinitialized" );




More information about the vlc-devel mailing list