Commit 94c51c45 authored by Sam Hocevar's avatar Sam Hocevar

  * Code cleanup: removed a few tabulations.
  * Fixed inline asm routines to remove all read/write operands.
  * Added <string.h> to most files to prevent warnings under FreeBSD.
  * Added "break;" after "default:" in case switches to prevent
    warnings when compiling with GCC 3.0pre.
parent f3f860ca
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
*****************************************************************************
* Copyright (C) 1998-2000 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2001 VideoLAN
* $Id: DVDioctl.cpp,v 1.3 2001/04/04 16:33:07 sam Exp $
* $Id: DVDioctl.cpp,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -461,6 +461,8 @@ static int DVDBlockIoctl( dev_t dev, u_long cmd, caddr_t addr, int flags,
log( LOG_INFO, "DVD ioctl: IODVD_READ_STRUCTURE\n" );
/* We don't do anything, since I don't know what to do */
return 0;
case IODVD_SEND_KEY:
......
DVD driver for Darwin and Mac OS X
==================================
This experimental kernel extension (KEXT) for Darwin is a wrapper for
the DVD-related kernel IOKit functions. It was written for two main reasons:
- the lack of userland support for DVD key negociation functions
- the fact that the kernel locks mounted device, preventing raw device
reads if the DVD is mounted
Building the driver
===================
You can either load the project in Project Builder and press the "build"
icon, or open a terminal window and type "pbxbuild".
Installing the driver
=====================
Open a terminal window, and type "kextload build/DVDioctl.kext", or whatever
the path to the build tree is. You need to be root in order to do this.
Using the driver
================
The driver creates a special /dev/dvd block device upon loading. When a
process tries to open this device, it looks for an IODVDMedia object and
opens it. All further operation done to the /dev/dvd device are then
forwarded to the IODVDMedia device.
......@@ -2,7 +2,7 @@
* aout_alsa.c : Alsa functions library
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: aout_alsa.c,v 1.12 2001/03/21 13:42:33 sam Exp $
* $Id: aout_alsa.c,v 1.13 2001/04/06 09:15:47 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
......@@ -270,8 +270,8 @@ static int aout_SetFormat( aout_thread_t *p_aout )
snd_pcm_playback_go( p_aout->p_sys->p_alsa_handle );
if( i_playback_go_returns )
{
intf_ErrMsg( "ALSA_PLUGIN : Unable to prepare channel (bis) :
exit = %i", i_playback_go_returns );
intf_ErrMsg( "ALSA_PLUGIN : Unable to prepare channel (bis) : "
"exit = %i", i_playback_go_returns );
intf_ErrMsg( "This means : %s",
snd_strerror( i_set_param_returns ) );
return( -1 );
......
......@@ -2,7 +2,7 @@
* dvd_css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_css.c,v 1.20 2001/04/04 02:49:18 sam Exp $
* $Id: dvd_css.c,v 1.21 2001/04/06 09:15:47 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -521,7 +521,8 @@ int CSSDescrambleSector( dvd_key_t pi_key, u8* pi_sec )
i_t3 = (i_t3 << 8 ) | i_t6;
i_t6 = pi_css_tab4[i_t6];
i_t5 += i_t6 + i_t4;
*pi_sec++ = pi_css_tab1[*pi_sec] ^( i_t5 & 0xff );
*pi_sec = pi_css_tab1[*pi_sec] ^( i_t5 & 0xff );
pi_sec++;
i_t5 >>= 8;
}
}
......
......@@ -2,7 +2,7 @@
* dvd_ioctl.c: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ioctl.c,v 1.6 2001/04/04 16:33:07 sam Exp $
* $Id: dvd_ioctl.c,v 1.7 2001/04/06 09:15:47 sam Exp $
*
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Samuel Hocevar <sam@zoy.org>
......@@ -27,6 +27,7 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include <sys/types.h>
#include <netinet/in.h>
......
......@@ -7,7 +7,7 @@
* will only be given back to netlist when refcount is zero.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: dvd_netlist.c,v 1.4 2001/04/01 07:31:38 stef Exp $
* $Id: dvd_netlist.c,v 1.5 2001/04/06 09:15:47 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
* Stphane Borel <stef@videolan.org>
......@@ -33,6 +33,7 @@
#include "defs.h"
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
#include <sys/types.h>
#include <sys/uio.h> /* struct iovec */
#include <unistd.h>
......
......@@ -2,7 +2,7 @@
* vout_ggi.c: GGI video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: vout_ggi.c,v 1.8 2001/03/21 13:42:34 sam Exp $
* $Id: vout_ggi.c,v 1.9 2001/04/06 09:15:47 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -231,7 +231,6 @@ int vout_Manage( vout_thread_t *p_vout )
default:
break;
}
break;
case evPtrButtonRelease:
......@@ -243,8 +242,10 @@ int vout_Manage( vout_thread_t *p_vout )
p_main->p_intf->b_menu_change = 1;
break;
}
break;
default:
break;
}
}
......
......@@ -2,7 +2,7 @@
* idct_common.c : common IDCT functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: idct_common.c,v 1.3 2001/01/17 18:17:30 massiot Exp $
* $Id: idct_common.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Gal Hendryckx <jimmy@via.ecp.fr>
*
......@@ -26,6 +26,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_sdl.c,v 1.45 2001/03/21 13:42:34 sam Exp $
* $Id: vout_sdl.c,v 1.46 2001/04/06 09:15:47 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
......
......@@ -2,7 +2,7 @@
* ac3_bit_allocate.c: ac3 allocation tables
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: ac3_bit_allocate.c,v 1.16 2001/03/21 13:42:34 sam Exp $
* $Id: ac3_bit_allocate.c,v 1.17 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......@@ -24,6 +24,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "int_types.h"
#include "ac3_decoder.h"
#include "ac3_internal.h"
......
......@@ -2,7 +2,7 @@
* ac3_decoder_thread.c: ac3 decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_decoder_thread.c,v 1.26 2001/02/22 05:31:55 reno Exp $
* $Id: ac3_decoder_thread.c,v 1.27 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
......@@ -38,6 +38,7 @@
#include <unistd.h> /* getpid() */
#include <stdio.h> /* "intf_msg.h" */
#include <string.h> /* memcpy(), memset() */
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
......@@ -254,6 +255,7 @@ static void RunThread (ac3dec_thread_t * p_ac3dec)
vlc_mutex_unlock (&p_ac3dec->p_aout_fifo->data_lock);
bad_frame:
continue;
}
/* If b_error is set, the ac3 decoder thread enters the error loop */
......
......@@ -2,7 +2,7 @@
* ac3_downmix.c: ac3 downmix functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_downmix.c,v 1.18 2001/03/21 13:42:34 sam Exp $
* $Id: ac3_downmix.c,v 1.19 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......
......@@ -2,7 +2,7 @@
* ac3_downmix_c.c: ac3 downmix functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: ac3_downmix_c.c,v 1.3 2001/03/21 13:42:34 sam Exp $
* $Id: ac3_downmix_c.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Renaud Dartus <reno@videolan.org>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......
......@@ -2,7 +2,7 @@
* ac3_exponent.c: ac3 exponent calculations
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_exponent.c,v 1.21 2001/03/21 13:42:34 sam Exp $
* $Id: ac3_exponent.c,v 1.22 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@zoy.org>
......@@ -24,6 +24,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* ac3_mantissa.c: ac3 mantissa computation
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: ac3_mantissa.c,v 1.21 2001/03/21 13:42:34 sam Exp $
* $Id: ac3_mantissa.c,v 1.22 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......@@ -25,6 +25,8 @@
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* ac3_parse.c: ac3 parsing procedures
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: ac3_parse.c,v 1.16 2001/03/21 13:42:34 sam Exp $
* $Id: ac3_parse.c,v 1.17 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......@@ -25,9 +25,10 @@
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
......
......@@ -2,7 +2,7 @@
* adec_generic.c: MPEG audio decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: adec_generic.c,v 1.4 2001/03/21 13:42:34 sam Exp $
* $Id: adec_generic.c,v 1.5 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -24,6 +24,8 @@
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* adec_layer1.c: MPEG Layer I audio decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: adec_layer1.c,v 1.3 2001/03/21 13:42:34 sam Exp $
* $Id: adec_layer1.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -31,6 +31,9 @@
#include "defs.h"
#include <stdlib.h> /* NULL */
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* adec_layer2.c: MPEG Layer II audio decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: adec_layer2.c,v 1.3 2001/03/21 13:42:34 sam Exp $
* $Id: adec_layer2.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -31,6 +31,9 @@
#include "defs.h"
#include <stdlib.h> /* NULL */
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* audio_decoder.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: audio_decoder.c,v 1.47 2001/02/11 01:15:10 sam Exp $
* $Id: audio_decoder.c,v 1.48 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -39,6 +39,7 @@
#include <unistd.h> /* getpid() */
#include <stdio.h> /* "intf_msg.h" */
#include <string.h> /* memcpy(), memset() */
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
......
......@@ -2,7 +2,7 @@
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_clock.c,v 1.8 2001/03/14 00:40:24 massiot Exp $
* $Id: input_clock.c,v 1.9 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -26,6 +26,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_dec.c,v 1.9 2001/04/03 03:39:41 stef Exp $
* $Id: input_dec.c,v 1.10 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -27,6 +27,8 @@
#include "defs.h"
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* input_ext-dec.c: services to the decoders
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ext-dec.c,v 1.11 2001/03/21 13:42:34 sam Exp $
* $Id: input_ext-dec.c,v 1.12 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -26,6 +26,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ext-intf.c,v 1.18 2001/04/01 07:31:38 stef Exp $
* $Id: input_ext-intf.c,v 1.19 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -26,6 +26,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......@@ -119,6 +121,7 @@ void input_SetStatus( input_thread_t * p_input, int i_mode )
break;
default:
break;
}
vlc_cond_signal( &p_input->stream.stream_wait );
......
......@@ -2,7 +2,7 @@
* input_netlist.c: netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_netlist.c,v 1.32 2001/03/10 11:23:10 henri Exp $
* $Id: input_netlist.c,v 1.33 2001/04/06 09:15:47 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
......@@ -27,6 +27,7 @@
#include "defs.h"
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
#include <sys/types.h>
#include <sys/uio.h> /* struct iovec */
#include <unistd.h>
......
......@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.43 2001/04/03 03:39:41 stef Exp $
* $Id: input_programs.c,v 1.44 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -27,6 +27,7 @@
#include "defs.h"
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
......
......@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mpeg_system.c,v 1.46 2001/04/05 14:00:28 asmax Exp $
* $Id: mpeg_system.c,v 1.47 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -31,6 +31,7 @@
#include "defs.h"
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
......
......@@ -19,7 +19,7 @@
* More informations about parameters stand in `list of commands' section.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_ctrl.c,v 1.34 2001/03/21 13:42:34 sam Exp $
* $Id: intf_ctrl.c,v 1.35 2001/04/06 09:15:47 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -45,6 +45,7 @@
#include <sys/stat.h> /* on BSD, fstat() needs stat.h */
#include <stdio.h> /* fprintf() */
#include <string.h> /* strcmp() */
#include <stdlib.h> /* malloc(), free() */
#include <unistd.h> /* close(), read() */
#include <fcntl.h> /* open() */
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.81 2001/04/05 03:50:38 sam Exp $
* $Id: main.c,v 1.82 2001/04/06 09:15:47 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -940,14 +940,14 @@ static int CPUCapabilities( void )
: "cc" ); \
/* test for a 486 CPU */
asm volatile ( "pushfl
popl %%eax
movl %%eax, %%ebx
xorl $0x200000, %%eax
pushl %%eax
popfl
pushfl
popl %%eax"
asm volatile ( "pushfl\n\t"
"popl %%eax\n\t"
"movl %%eax, %%ebx\n\t"
"xorl $0x200000, %%eax\n\t"
"pushl %%eax\n\t"
"popfl\n\t"
"pushfl\n\t"
"popl %%eax"
: "=a" ( i_eax ),
"=b" ( i_ebx )
:
......
......@@ -2,7 +2,7 @@
* lpcm_decoder.c: core lpcm decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: lpcm_decoder.c,v 1.6 2001/03/21 13:42:34 sam Exp $
* $Id: lpcm_decoder.c,v 1.7 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -20,9 +20,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <stdio.h>
#include "defs.h"
#include <stdio.h>
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* lpcm_decoder_thread.c: lpcm decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: lpcm_decoder_thread.c,v 1.12 2001/04/02 23:30:41 sam Exp $
* $Id: lpcm_decoder_thread.c,v 1.13 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -29,6 +29,7 @@
#include <unistd.h> /* getpid() */
#include <stdio.h> /* "intf_msg.h" */
#include <string.h> /* memcpy(), memset() */
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
......@@ -201,7 +202,9 @@ static void RunThread (lpcmdec_thread_t * p_lpcmdec)
vlc_mutex_unlock (&p_lpcmdec->p_aout_fifo->data_lock);
intf_DbgMsg( "LPCM Debug: %x", *buffer );
bad_frame:
continue;
}
/* If b_error is set, the lpcm decoder thread enters the error loop */
......
......@@ -3,7 +3,7 @@
* Functions are prototyped in tests.h.
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: tests.c,v 1.5 2001/03/21 13:42:34 sam Exp $
* $Id: tests.c,v 1.6 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
*
......@@ -27,6 +27,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
......
......@@ -2,7 +2,7 @@
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: spu_decoder.c,v 1.34 2001/03/21 13:42:34 sam Exp $
* $Id: spu_decoder.c,v 1.35 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -26,9 +26,11 @@
*****************************************************************************/
#include "defs.h"
#include <stdlib.h> /* malloc(), free() */
#include <unistd.h> /* getpid() */
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* video_decoder.c : video decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_decoder.c,v 1.47 2001/02/19 19:08:59 massiot Exp $
* $Id: video_decoder.c,v 1.48 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gal Hendryckx <jimmy@via.ecp.fr>
......@@ -27,8 +27,10 @@
*****************************************************************************/
#include "defs.h"
#include <stdlib.h> /* free() */
#include <unistd.h> /* getpid() */
#include <stdlib.h> /* free() */
#include <string.h> /* memcpy(), memset() */
#include <errno.h> /* errno */
#include "config.h"
......@@ -247,83 +249,84 @@ static __inline__ void AddBlock( vdec_thread_t * p_vdec, dctelem_t * p_block,
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw (%1),%%mm2\n\t"
"paddw 8(%1),%%mm1\n\t"
"paddw (%2),%%mm2\n\t"
"paddw 8(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw 16(%1),%%mm2\n\t"
"paddw 24(%1),%%mm1\n\t"
"paddw 16(%2),%%mm2\n\t"
"paddw 24(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw 32(%1),%%mm2\n\t"
"paddw 40(%1),%%mm1\n\t"
"paddw 32(%2),%%mm2\n\t"
"paddw 40(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw 48(%1),%%mm2\n\t"
"paddw 56(%1),%%mm1\n\t"
"paddw 48(%2),%%mm2\n\t"
"paddw 56(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw 64(%1),%%mm2\n\t"
"paddw 72(%1),%%mm1\n\t"
"paddw 64(%2),%%mm2\n\t"
"paddw 72(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw 80(%1),%%mm2\n\t"
"paddw 88(%1),%%mm1\n\t"
"paddw 80(%2),%%mm2\n\t"
"paddw 88(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw 96(%1),%%mm2\n\t"
"paddw 104(%1),%%mm1\n\t"
"paddw 96(%2),%%mm2\n\t"
"paddw 104(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
"paddw 112(%1),%%mm2\n\t"
"paddw 120(%1),%%mm1\n\t"
"paddw 112(%2),%%mm2\n\t"
"paddw 120(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
//"emms"
:"+r" (p_data): "r" (p_block),"r" (i_incr+8));
: "=r" (p_data)
: "0" (p_data), "r" (p_block), "r" (i_incr + 8) );
}
#endif
......@@ -351,46 +354,48 @@ static __inline__ void CopyBlock( vdec_thread_t * p_vdec, dctelem_t * p_block,
yuv_data_t * p_data, int i_incr )
{
asm __volatile__ (
"movq (%1),%%mm0\n\t"
"packuswb 8(%1),%%mm0\n\t"
"movq (%2),%%mm0\n\t"
"packuswb 8(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq 16(%1),%%mm0\n\t"
"packuswb 24(%1),%%mm0\n\t"
"movq 16(%2),%%mm0\n\t"
"packuswb 24(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq 32(%1),%%mm0\n\t"
"packuswb 40(%1),%%mm0\n\t"
"movq 32(%2),%%mm0\n\t"
"packuswb 40(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq 48(%1),%%mm0\n\t"
"packuswb 56(%1),%%mm0\n\t"
"movq 48(%2),%%mm0\n\t"
"packuswb 56(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq 64(%1),%%mm0\n\t"
"packuswb 72(%1),%%mm0\n\t"
"movq 64(%2),%%mm0\n\t"
"packuswb 72(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq 80(%1),%%mm0\n\t"
"packuswb 88(%1),%%mm0\n\t"
"movq 80(%2),%%mm0\n\t"
"packuswb 88(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq 96(%1),%%mm0\n\t"
"packuswb 104(%1),%%mm0\n\t"
"movq 96(%2),%%mm0\n\t"
"packuswb 104(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
"addl %2,%0\n\t"
"addl %3,%0\n\t"
"movq 112(%1),%%mm0\n\t"
"packuswb 120(%1),%%mm0\n\t"
"movq 112(%2),%%mm0\n\t"
"packuswb 120(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
//"emms"
:"+r" (p_data): "r" (p_block),"r" (i_incr+8));
: "=r" (p_data)
: "0" (p_data), "r" (p_block), "r" (i_incr + 8) );
}
#endif
......
......@@ -2,7 +2,7 @@
* video_spu.c : DVD subpicture units functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_spu.c,v 1.19 2001/03/21 13:42:35 sam Exp $
* $Id: video_spu.c,v 1.20 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -27,6 +27,7 @@
#include "defs.h"
#include <stdio.h>
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
......
......@@ -2,7 +2,7 @@
* video_fifo.c : video FIFO management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_fifo.c,v 1.29 2001/02/11 01:15:12 sam Exp $
* $Id: video_fifo.c,v 1.30 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -26,6 +26,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
......@@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_headers.c,v 1.80 2001/03/02 13:20:29 massiot Exp $
* $Id: vpar_headers.c,v 1.81 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
......@@ -28,6 +28,7 @@
#include "defs.h"
#include <stdlib.h> /* free() */
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
......@@ -282,6 +283,7 @@ int vpar_ParseHeader( vpar_thread_t * p_vpar )
break;
default:
break;
}
}
......@@ -910,6 +912,7 @@ static void ExtensionAndUserData( vpar_thread_t * p_vpar )
CopyrightExtension( p_vpar );
break;
default:
break;
}
break;
......
......@@ -2,7 +2,7 @@
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_synchro.c,v 1.86 2001/02/23 13:22:58 massiot Exp $
* $Id: vpar_synchro.c,v 1.87 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -96,6 +96,8 @@
*****************************************************************************/
#include "defs.h"
#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
#include "threads.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment