Changeset 647cca0ebb2e897a570018ba80483bb81a7d90c6

Show
Ignore:
Timestamp:
01/18/01 06:13:23 (7 years ago)
Author:
Sam Hocevar <sam@videolan.org>
git-committer:
Sam Hocevar <sam@videolan.org> 979794803 +0000
git-parent:

[cf0b7cf953a80e78c1778e819b4d5b03216dc165]

git-author:
Sam Hocevar <sam@videolan.org> 979794803 +0000
Message:

The motion compensation routines are now modules as well ; choose your

implementation with --motion motion', --motion motionmmx' or
`--motion motionmmxext'. Of course, the best implementation is chosen
if you don't ask for any. There doesn't seem to be any performance hit
due to the move to shared libs, which is a good thing. Please test
actively if you have time, though.

Updated --help result, manpage, INSTALL document, and a few files.

I moved vdec_motion.h and vpar_blocks.h back to /include because they

will be needed to build motion compensation modules, but perhaps we don't
need to export everything which is in these files.

/src/video_decoder/ now has only one .c file, perhaps it could now be

merged with video_parser ?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • INSTALL

    rffa693e r647cca0  
    2929 
    3030 
     31Here's a shortcut to copy-paste to do a clean build : 
     32 
     33   make distclean 2>/dev/null ; ./configure --prefix=/usr --enable-gnome \ 
     34      --enable-fb --with-glide --with-ggi --with-sdl --enable-esd \ 
     35      --enable-alsa && make 
     36 
     37 
    3138Installing and running VideoLAN 
    3239=============================== 
  • Makefile.in

    rcf0b7cf r647cca0  
    226226#GEN_DECODER =  src/generic_decoder/generic_decoder.o 
    227227 
    228  
    229228VIDEO_PARSER =  src/video_parser/video_parser.o \ 
    230229        src/video_parser/vpar_headers.o \ 
     
    233232        src/video_parser/video_fifo.o 
    234233 
    235 ifneq (,$(findstring mmx,$(ARCH))) 
    236     vdec_motion_inner = src/video_decoder/vdec_motion_inner_mmx.o 
    237 else 
    238     vdec_motion_inner = src/video_decoder/vdec_motion_inner.o 
    239 endif 
    240  
    241 VIDEO_DECODER = src/video_decoder/video_decoder.o \ 
    242         src/video_decoder/vdec_motion.o \ 
    243         $(vdec_motion_inner) 
     234VIDEO_DECODER = src/video_decoder/video_decoder.o 
    244235 
    245236MISC =      src/misc/mtime.o \ 
     
    345336        plugins/yuv/transforms_yuvmmx.o 
    346337 
     338PLUGIN_MOTION = plugins/motion/motion.o \ 
     339        plugins/motion/vdec_motion_common.o \ 
     340        plugins/motion/vdec_motion_inner.o 
     341 
     342PLUGIN_MOTIONMMX =  plugins/motion/motionmmx.o \ 
     343            plugins/motion/vdec_motion_common.o \ 
     344            plugins/motion/vdec_motion_inner_mmx.o 
     345 
     346PLUGIN_MOTIONMMXEXT =   plugins/motion/motionmmxext.o \ 
     347            plugins/motion/vdec_motion_common.o \ 
     348            plugins/motion/vdec_motion_inner_mmxext.o 
     349 
    347350PLUGIN_IDCT =   plugins/idct/idct.o \ 
    348351        plugins/idct/idct_common.o 
     
    370373        $(PLUGIN_YUV) \ 
    371374        $(PLUGIN_YUVMMX) \ 
     375        $(PLUGIN_MOTION) \ 
     376        $(PLUGIN_MOTIONMMX) \ 
     377        $(PLUGIN_MOTIONMMXEXT) \ 
    372378        $(PLUGIN_IDCT) \ 
    373379        $(PLUGIN_IDCTCLASSIC) \ 
     
    379385 
    380386# list duplicates 
    381 STD_PLUGIN_COMMON = plugins/idct/idct_common.o 
     387STD_PLUGIN_COMMON = plugins/idct/idct_common.o \ 
     388            plugins/motion/vdec_motion_common.o 
    382389 
    383390# filter out duplicates from the plugin object lists 
     
    405412clean: 
    406413    rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) 
    407     rm -f plugins/*/*.o src/*/*.o 
    408     rm -f vlc @ALIASES@ lib/*.so 
     414    rm -f plugins/*/*.o src/*/*.o lib/*.so 
     415    rm -f vlc @ALIASES@ 
    409416 
    410417distclean: clean 
     
    559566    $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
    560567 
     568lib/yuv.so: $(PLUGIN_YUV) 
     569    $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
     570 
     571lib/yuvmmx.so: $(PLUGIN_YUVMMX) 
     572    $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
     573 
     574lib/motion.so: $(PLUGIN_MOTION) 
     575    $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
     576 
     577lib/motionmmx.so: $(PLUGIN_MOTIONMMX) 
     578    $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
     579 
     580lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) 
     581    $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
     582 
    561583lib/idct.so: $(PLUGIN_IDCT) 
    562     $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
    563  
    564 lib/yuv.so: $(PLUGIN_YUV) 
    565     $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
    566  
    567 lib/yuvmmx.so: $(PLUGIN_YUVMMX) 
    568584    $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ 
    569585 
     
    587603 
    588604lib/yuvmmx.so: $(PLUGIN_YUVMMX) 
     605    $(CC) $(PCFLAGS) -shared -o $@ $^ 
     606 
     607lib/motion.so: $(PLUGIN_MOTION) 
     608    $(CC) $(PCFLAGS) -shared -o $@ $^ 
     609 
     610lib/motionmmx.so: $(PLUGIN_MOTIONMMX) 
     611    $(CC) $(PCFLAGS) -shared -o $@ $^ 
     612 
     613lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) 
    589614    $(CC) $(PCFLAGS) -shared -o $@ $^ 
    590615 
  • configure

    r3a8481d r647cca0  
    32973297 
    32983298 
    3299 PLUGINS=${PLUGINS}"yuv idct idctclassic "; 
     3299PLUGINS=${PLUGINS}"yuv idct idctclassic motion "; 
    33003300 
    33013301ARCH=${host_cpu} 
     
    33113311if test "${enable_mmx+set}" = set; then 
    33123312  enableval="$enable_mmx" 
    3313    if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx idctmmx idctmmxext "; fi  
    3314 else 
    3315    if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx idctmmx idctmmxext "; fi  
     3313   if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi  
     3314else 
     3315   if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi  
    33163316fi 
    33173317 
  • configure.in

    r3a8481d r647cca0  
    109109 
    110110dnl default plugins  
    111 PLUGINS=${PLUGINS}"yuv idct idctclassic "; 
     111PLUGINS=${PLUGINS}"yuv idct idctclassic motion "; 
    112112 
    113113ARCH=${host_cpu} 
     
    118118AC_ARG_ENABLE(mmx, 
    119119[  --disable-mmx           Disable MMX optimizations (default enabled for x86)], 
    120 [ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx idctmmx idctmmxext "; fi ], 
    121 [ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx idctmmx idctmmxext "; fi ]) 
     120[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi ], 
     121[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi ]) 
    122122AC_ARG_ENABLE(debug, 
    123123[  --enable-debug          Enable debug mode (default disabled)], 
  • debian/vlc.1

    r619061c r647cca0  
    4747.B \-\-vout <module> 
    4848Specify a video output module: "gnome", "fb", "glide", for instance. 
     49.TP 
     50.B \-\-motion <module> 
     51Specify a module for motion compensation: "motion", "motionmmx", for instance. 
    4952.TP 
    5053.B \-\-idct <module> 
  • include/common.h

    r26ee312 r647cca0  
    44 ***************************************************************************** 
    55 * Copyright (C) 1998, 1999, 2000 VideoLAN 
    6  * $Id: common.h,v 1.24 2001/01/13 12:57:19 sam Exp $ 
     6 * $Id: common.h,v 1.25 2001/01/18 05:13:22 sam Exp $ 
    77 * 
    88 * Authors: Samuel Hocevar <sam@via.ecp.fr> 
     
    129129typedef struct video_parser_s *         p_video_parser_t; 
    130130 
     131/* Misc */ 
     132struct macroblock_s; 
     133 
    131134/***************************************************************************** 
    132135 * Macros and inline functions 
  • include/config.h.in

    r619061c r647cca0  
    279279#define VOUT_METHOD_VAR                 "vlc_vout" 
    280280 
     281/* Environment variable containing the motion compensation method */ 
     282#define MOTION_METHOD_VAR               "vlc_motion" 
     283 
    281284/* Environment variable containing the IDCT method */ 
    282285#define IDCT_METHOD_VAR                 "vlc_idct" 
  • include/modules.h

    rcf0b7cf r647cca0  
    4141#define MODULE_CAPABILITY_ADEC     1 <<  3  /* Audio decoder */ 
    4242#define MODULE_CAPABILITY_VDEC     1 <<  4  /* Video decoder */ 
    43 #define MODULE_CAPABILITY_IDCT     1 <<  5  /* IDCT transformation */ 
    44 #define MODULE_CAPABILITY_AOUT     1 <<  6  /* Audio output */ 
    45 #define MODULE_CAPABILITY_VOUT     1 <<  7  /* Video output */ 
    46 #define MODULE_CAPABILITY_YUV      1 <<  8  /* YUV colorspace conversion */ 
    47 #define MODULE_CAPABILITY_AFX      1 <<  9  /* Audio effects */ 
    48 #define MODULE_CAPABILITY_VFX      1 << 10  /* Video effects */ 
     43#define MODULE_CAPABILITY_MOTION   1 <<  5  /* Video decoder */ 
     44#define MODULE_CAPABILITY_IDCT     1 <<  6  /* IDCT transformation */ 
     45#define MODULE_CAPABILITY_AOUT     1 <<  7  /* Audio output */ 
     46#define MODULE_CAPABILITY_VOUT     1 <<  8  /* Video output */ 
     47#define MODULE_CAPABILITY_YUV      1 <<  9  /* YUV colorspace conversion */ 
     48#define MODULE_CAPABILITY_AFX      1 << 10  /* Audio effects */ 
     49#define MODULE_CAPABILITY_VFX      1 << 11  /* Video effects */ 
    4950 
    5051/* FIXME: not yet used */ 
     
    7475            void ( * pf_close )      ( struct aout_thread_s * p_aout ); 
    7576        } aout; 
     77 
     78        struct 
     79        { 
     80#define motion_functions( yuv ) \ 
     81            void ( * pf_field_field_##yuv ) ( struct macroblock_s * ); \ 
     82            void ( * pf_field_16x8_##yuv )  ( struct macroblock_s * ); \ 
     83            void ( * pf_field_dmv_##yuv )   ( struct macroblock_s * ); \ 
     84            void ( * pf_frame_field_##yuv ) ( struct macroblock_s * ); \ 
     85            void ( * pf_frame_frame_##yuv ) ( struct macroblock_s * ); \ 
     86            void ( * pf_frame_dmv_##yuv )   ( struct macroblock_s * ); 
     87        motion_functions( 420 ) 
     88        motion_functions( 422 ) 
     89        motion_functions( 444 ) 
     90#undef motion_functions 
     91        } motion; 
    7692 
    7793        struct 
     
    106122    function_list_t adec; 
    107123    function_list_t vdec; 
     124    function_list_t motion; 
    108125    function_list_t idct; 
    109126    function_list_t aout; 
  • plugins/idct/idct.c

    rcf0b7cf r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: idct.c,v 1.5 2001/01/17 18:17:30 massiot Exp $ 
     5 * $Id: idct.c,v 1.6 2001/01/18 05:13:22 sam Exp $ 
    66 * 
    77 * Authors: Ga�Hendryckx <jimmy@via.ecp.fr> 
     
    7474{ 
    7575    p_module->psz_name = MODULE_STRING; 
    76     p_module->psz_longname = "C IDCT module"; 
     76    p_module->psz_longname = "IDCT module"; 
    7777    p_module->psz_version = VERSION; 
    7878 
  • plugins/idct/idctclassic.c

    rcf0b7cf r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: idctclassic.c,v 1.5 2001/01/17 18:17:30 massiot Exp $ 
     5 * $Id: idctclassic.c,v 1.6 2001/01/18 05:13:22 sam Exp $ 
    66 * 
    77 * Authors: Ga�Hendryckx <jimmy@via.ecp.fr> 
     
    7474{ 
    7575    p_module->psz_name = MODULE_STRING; 
    76     p_module->psz_longname = "classic C IDCT module"; 
     76    p_module->psz_longname = "classic IDCT module"; 
    7777    p_module->psz_version = VERSION; 
    7878 
  • plugins/idct/idctmmx.c

    rcf0b7cf r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: idctmmx.c,v 1.6 2001/01/17 18:17:30 massiot Exp $ 
     5 * $Id: idctmmx.c,v 1.7 2001/01/18 05:13:22 sam Exp $ 
    66 * 
    77 * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca> 
     
    154154        else 
    155155        { 
    156             return( 100 ); 
     156            return( 150 ); 
    157157        } 
    158158    } 
  • plugins/yuv/video_yuv.c

    r619061c r647cca0  
    8383 
    8484    /* This module always works */ 
    85     return( 100 ); 
     85    return( 50 ); 
    8686} 
    8787 
  • plugins/yuv/yuv.c

    rf56c4db r647cca0  
    6565{ 
    6666    p_module->psz_name = MODULE_STRING; 
    67     p_module->psz_longname = "C YUV module"; 
     67    p_module->psz_longname = "YUV transformations module"; 
    6868    p_module->psz_version = VERSION; 
    6969 
  • plugins/yuv/yuvmmx.c

    rf56c4db r647cca0  
    6565{ 
    6666    p_module->psz_name = MODULE_STRING; 
    67     p_module->psz_longname = "MMX YUV module"; 
     67    p_module->psz_longname = "MMX YUV transformations module"; 
    6868    p_module->psz_version = VERSION; 
    6969 
  • src/input/input_programs.c

    ra558a9b r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: input_programs.c,v 1.25 2001/01/12 17:33:18 massiot Exp $ 
     5 * $Id: input_programs.c,v 1.26 2001/01/18 05:13:22 sam Exp $ 
    66 * 
    77 * Authors: 
     
    580580    } 
    581581 
     582    if( p_es->thread_id == 0 ) 
     583    { 
     584        return( -1 ); 
     585    } 
     586 
    582587    if( p_es->p_decoder_fifo != NULL ) 
    583588    { 
  • src/interface/main.c

    rba59eb0 r647cca0  
    8080#define OPT_HEIGHT              164 
    8181#define OPT_COLOR               165 
    82 #define OPT_IDCT                166 
    83 #define OPT_YUV                 167 
     82#define OPT_MOTION              167 
     83#define OPT_IDCT                168 
     84#define OPT_YUV                 169 
    8485 
    8586#define OPT_VLANS               170 
     
    123124    {   "grayscale",        0,          0,      'g' }, 
    124125    {   "color",            0,          0,      OPT_COLOR }, 
     126    {   "motion",           1,          0,      OPT_MOTION }, 
    125127    {   "idct",             1,          0,      OPT_IDCT }, 
    126128    {   "yuv",              1,          0,      OPT_YUV }, 
     
    570572            main_PutIntVariable( VOUT_GRAYSCALE_VAR, 0 ); 
    571573            break; 
     574    case OPT_MOTION:                                         /* --motion */ 
     575            main_PutPszVariable( MOTION_METHOD_VAR, optarg ); 
     576            break; 
    572577    case OPT_IDCT:                                             /* --idct */ 
    573578            main_PutPszVariable( IDCT_METHOD_VAR, optarg ); 
     
    671676              "\n  -g, --grayscale                \tgrayscale output" 
    672677              "\n      --color                    \tcolor output" 
     678              "\n      --motion <module>          \tmotion compensation method" 
    673679              "\n      --idct <module>            \tIDCT method" 
    674680              "\n      --yuv <module>             \tYUV method" 
     
    715721              "\n  " VOUT_FB_DEV_VAR "=<filename>           \tframebuffer device path" 
    716722              "\n  " VOUT_GRAYSCALE_VAR "={1|0}             \tgrayscale or color output" 
     723              "\n  " MOTION_METHOD_VAR "=<method name>      \tmotion compensation method" 
    717724              "\n  " IDCT_METHOD_VAR "=<method name>        \tIDCT method" 
    718725              "\n  " YUV_METHOD_VAR "=<method name>         \tYUV method" 
  • src/misc/modules.c

    rf56c4db r647cca0  
    452452    p_bank->first = p_module; 
    453453 
    454     intf_Msg( "module: dynamic module `%s', %s", 
    455               p_module->psz_name, p_module->psz_longname ); 
     454    /* Immediate message so that a slow module doesn't make the user wait */ 
     455    intf_MsgImm( "module: dynamic module `%s', %s", 
     456                 p_module->psz_name, p_module->psz_longname ); 
    456457 
    457458    return( 0 ); 
  • src/video_decoder/video_decoder.c

    r454454b r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: video_decoder.c,v 1.44 2001/01/05 18:46:44 massiot Exp $ 
     5 * $Id: video_decoder.c,v 1.45 2001/01/18 05:13:23 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    4646#include "video_output.h" 
    4747 
     48#include "vdec_motion.h" 
    4849#include "vdec_idct.h" 
    4950#include "video_decoder.h" 
    50 #include "vdec_motion.h" 
    5151 
    5252#include "vpar_blocks.h" 
  • src/video_decoder/video_parser.h

    rcf0b7cf r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: video_parser.h,v 1.5 2001/01/17 18:17:30 massiot Exp $ 
     5 * $Id: video_parser.h,v 1.6 2001/01/18 05:13:23 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    134134    u8                      pi_default_nonintra_quant[64]; 
    135135 
     136    /* Motion compensation plugin used and shortcuts */ 
     137    struct module_s *       p_motion_module; 
     138    void ( * pppf_motion[4][2][4] )     ( struct macroblock_s * ); 
     139    void ( * ppf_motion_skipped[4][4] ) ( struct macroblock_s * ); 
     140 
    136141    /* IDCT plugin used and shortcuts to access its capabilities */ 
    137     struct module_s *       p_module; 
     142    struct module_s *       p_idct_module; 
    138143    idct_init_t             pf_init; 
    139144    f_idct_t                pf_sparse_idct; 
  • src/video_parser/video_fifo.c

    r26ee312 r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: video_fifo.c,v 1.27 2001/01/13 12:57:21 sam Exp $ 
     5 * $Id: video_fifo.c,v 1.28 2001/01/18 05:13:23 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    4242 
    4343#include "video_decoder.h" 
     44#include "vdec_motion.h" 
    4445#include "../video_decoder/vdec_idct.h" 
    45 #include "../video_decoder/vdec_motion.h" 
    4646 
    47 #include "../video_decoder/vpar_blocks.h" 
     47#include "vpar_blocks.h" 
    4848#include "../video_decoder/vpar_headers.h" 
    4949#include "../video_decoder/vpar_synchro.h" 
  • src/video_parser/video_parser.c

    rcf0b7cf r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: video_parser.c,v 1.68 2001/01/17 18:17:31 massiot Exp $ 
     5 * $Id: video_parser.c,v 1.69 2001/01/18 05:13:23 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    5353 
    5454#include "video_decoder.h" 
    55 #include "../video_decoder/vdec_motion.h" 
     55#include "vdec_motion.h" 
    5656#include "../video_decoder/vdec_idct.h" 
    5757 
    58 #include "../video_decoder/vpar_blocks.h" 
     58#include "vpar_blocks.h" 
    5959#include "../video_decoder/vpar_headers.h" 
    6060#include "../video_decoder/vpar_synchro.h" 
     
    102102    p_vpar->p_vout = p_config->p_vout; 
    103103 
    104     /* Choose the best IDCT module */ 
    105     p_vpar->p_module = module_Need( p_main->p_module_bank, 
    106                                     MODULE_CAPABILITY_IDCT, NULL ); 
    107  
    108     if( p_vpar->p_module == NULL ) 
    109     { 
    110         intf_ErrMsg( "vpar error: no suitable IDCT module" ); 
     104    /* 
     105     * Choose the best motion compensation module 
     106     */ 
     107    p_vpar->p_motion_module = module_Need( p_main->p_module_bank, 
     108                                           MODULE_CAPABILITY_MOTION, NULL ); 
     109 
     110    if( p_vpar->p_motion_module == NULL ) 
     111    { 
     112        intf_ErrMsg( "vpar error: no suitable motion compensation module" ); 
    111113        free( p_vpar ); 
    112114        return( 0 ); 
    113115    } 
    114116 
    115 #define idct_functions p_vpar->p_module->p_functions->idct.functions.idct 
    116     p_vpar->pf_init         = idct_functions.pf_init; 
    117     p_vpar->pf_sparse_idct  = idct_functions.pf_sparse_idct; 
    118     p_vpar->pf_idct         = idct_functions.pf_idct; 
    119     p_vpar->pf_norm_scan    = idct_functions.pf_norm_scan; 
    120 #undef idct_functions 
     117#define m ( p_vpar->pppf_motion ) 
     118#define s ( p_vpar->ppf_motion_skipped ) 
     119#define f ( p_vpar->p_motion_module->p_functions->motion.functions.motion ) 
     120    m[0][0][0] = m[0][0][1] = m[0][0][2] = m[0][0][3] = NULL; 
     121    m[0][1][0] = m[0][1][1] = m[0][1][2] = m[0][1][3] = NULL; 
     122    m[1][0][0] = NULL; 
     123    m[1][1][0] = NULL; 
     124    m[2][0][0] = NULL; 
     125    m[2][1][0] = NULL; 
     126    m[3][0][0] = NULL; 
     127    m[3][1][0] = NULL; 
     128 
     129    m[1][0][1] = f.pf_field_field_420; 
     130    m[1][1][1] = f.pf_frame_field_420; 
     131    m[2][0][1] = f.pf_field_field_422; 
     132    m[2][1][1] = f.pf_frame_field_422; 
     133    m[3][0][1] = f.pf_field_field_444; 
     134    m[3][1][1] = f.pf_frame_field_444; 
     135 
     136    m[1][0][2] = f.pf_field_16x8_420; 
     137    m[1][1][2] = f.pf_frame_frame_420; 
     138    m[2][0][2] = f.pf_field_16x8_422; 
     139    m[2][1][2] = f.pf_frame_frame_422; 
     140    m[3][0][2] = f.pf_field_16x8_444; 
     141    m[3][1][2] = f.pf_frame_frame_444; 
     142 
     143    m[1][0][3] = f.pf_field_dmv_420; 
     144    m[1][1][3] = f.pf_frame_dmv_420; 
     145    m[2][0][3] = f.pf_field_dmv_422; 
     146    m[2][1][3] = f.pf_frame_dmv_422; 
     147    m[3][0][3] = f.pf_field_dmv_444; 
     148    m[3][1][3] = f.pf_frame_dmv_444; 
     149 
     150    s[0][0] = s[0][1] = s[0][2] = s[0][3] = NULL; 
     151    s[1][0] = NULL; 
     152    s[2][0] = NULL; 
     153    s[3][0] = NULL; 
     154 
     155    s[1][1] = f.pf_field_field_420; 
     156    s[2][1] = f.pf_field_field_422; 
     157    s[3][1] = f.pf_field_field_444; 
     158 
     159    s[1][2] = f.pf_field_field_420; 
     160    s[2][2] = f.pf_field_field_422; 
     161    s[3][2] = f.pf_field_field_444; 
     162 
     163    s[1][3] = f.pf_frame_frame_420; 
     164    s[2][3] = f.pf_frame_frame_422; 
     165    s[3][3] = f.pf_frame_frame_444; 
     166#undef f 
     167#undef s 
     168#undef m 
     169 
     170     /* 
     171      * Choose the best IDCT module 
     172      */ 
     173    p_vpar->p_idct_module = module_Need( p_main->p_module_bank, 
     174                                         MODULE_CAPABILITY_IDCT, NULL ); 
     175 
     176    if( p_vpar->p_idct_module == NULL ) 
     177    { 
     178        intf_ErrMsg( "vpar error: no suitable IDCT module" ); 
     179        module_Unneed( p_main->p_module_bank, p_vpar->p_motion_module ); 
     180        free( p_vpar ); 
     181        return( 0 ); 
     182    } 
     183 
     184#define f p_vpar->p_idct_module->p_functions->idct.functions.idct 
     185    p_vpar->pf_init         = f.pf_init; 
     186    p_vpar->pf_sparse_idct  = f.pf_sparse_idct; 
     187    p_vpar->pf_idct         = f.pf_idct; 
     188    p_vpar->pf_norm_scan    = f.pf_norm_scan; 
     189#undef f 
    121190 
    122191    /* Spawn the video parser thread */ 
     
    125194    { 
    126195        intf_ErrMsg("vpar error: can't spawn video parser thread"); 
    127         module_Unneed( p_main->p_module_bank, p_vpar->p_module ); 
     196        module_Unneed( p_main->p_module_bank, p_vpar->p_idct_module ); 
     197        module_Unneed( p_main->p_module_bank, p_vpar->p_motion_module ); 
    128198        free( p_vpar ); 
    129199        return( 0 ); 
     
    435505    vlc_mutex_destroy( &(p_vpar->synchro.fifo_lock) ); 
    436506     
    437     module_Unneed( p_main->p_module_bank, p_vpar->p_module ); 
     507    module_Unneed( p_main->p_module_bank, p_vpar->p_idct_module ); 
     508    module_Unneed( p_main->p_module_bank, p_vpar->p_motion_module ); 
    438509 
    439510    free( p_vpar ); 
  • src/video_parser/vpar_blocks.c

    rcf0b7cf r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: vpar_blocks.c,v 1.71 2001/01/17 18:17:31 massiot Exp $ 
     5 * $Id: vpar_blocks.c,v 1.72 2001/01/18 05:13:23 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    4646 
    4747#include "video_decoder.h" 
     48#include "vdec_motion.h" 
    4849#include "../video_decoder/vdec_idct.h" 
    49 #include "../video_decoder/vdec_motion.h" 
    50  
    51 #include "../video_decoder/vpar_blocks.h" 
     50 
     51#include "vpar_blocks.h" 
    5252#include "../video_decoder/vpar_headers.h" 
    5353#include "../video_decoder/vpar_synchro.h" 
     
    15861586    macroblock_t *  p_mb; 
    15871587 
    1588     static f_motion_t   pf_motion_skipped[4][4] = 
    1589     { 
    1590         {NULL, NULL, NULL, NULL}, 
    1591         {NULL, vdec_MotionFieldField420, vdec_MotionFieldField420, 
    1592             vdec_MotionFrameFrame420}, 
    1593         {NULL, vdec_MotionFieldField422, vdec_MotionFieldField422, 
    1594             vdec_MotionFrameFrame422}, 
    1595         {NULL, vdec_MotionFieldField444, vdec_MotionFieldField444, 
    1596             vdec_MotionFrameFrame444}, 
    1597     }; 
    1598  
    15991588    if( i_coding_type == I_CODING_TYPE ) 
    16001589    { 
     
    16171606 
    16181607    /* Motion type is picture structure. */ 
    1619     p_mb->pf_motion = pf_motion_skipped[i_chroma_format] 
    1620                                        [i_structure]; 
     1608    p_mb->pf_motion = p_vpar->ppf_motion_skipped[i_chroma_format] 
     1609                                                [i_structure]; 
    16211610    p_mb->i_coded_block_pattern = 0; 
    16221611 
     
    18211810                                                           * field picture   */ 
    18221811{ 
    1823     static f_motion_t   pppf_motion[4][2][4] = 
    1824       { 
    1825         { {NULL, NULL, NULL, NULL}, 
    1826           {NULL, NULL, NULL, NULL} 
    1827         }, 
    1828         { {NULL, vdec_MotionFieldField420, vdec_MotionField16x8420, 
    1829             vdec_MotionFieldDMV420}, 
    1830           {NULL, vdec_MotionFrameField420, vdec_MotionFrameFrame420, 
    1831             vdec_MotionFrameDMV420} 
    1832         }, 
    1833         { {NULL, vdec_MotionFieldField422, vdec_MotionField16x8422, 
    1834             vdec_MotionFieldDMV422}, 
    1835           {NULL, vdec_MotionFrameField422, vdec_MotionFrameFrame422, 
    1836             vdec_MotionFrameDMV422} 
    1837         }, 
    1838         { {NULL, vdec_MotionFieldField444, vdec_MotionField16x8444, 
    1839             vdec_MotionFieldDMV444}, 
    1840           {NULL, vdec_MotionFrameField444, vdec_MotionFrameFrame444, 
    1841             vdec_MotionFrameDMV444} 
    1842         } 
    1843       }; 
    18441812    static int      pi_x[12] = {0,8,0,8,0,0,0,0,8,8,8,8}; 
    18451813    static int      pi_y[2][12] = { {0,0,8,8,0,0,8,8,0,0,8,8}, 
     
    19441912 
    19451913        /* Motion function pointer. */ 
    1946         p_mb->pf_motion = pppf_motion[i_chroma_format] 
    1947                                      [i_structure == FRAME_STRUCTURE] 
    1948                                      [p_vpar->mb.i_motion_type]; 
     1914        p_mb->pf_motion = p_vpar->pppf_motion[i_chroma_format] 
     1915                                             [i_structure == FRAME_STRUCTURE] 
     1916                                             [p_vpar->mb.i_motion_type]; 
    19491917 
    19501918        if( p_mb->i_mb_type & MB_PATTERN ) 
  • src/video_parser/vpar_headers.c

    rcf0b7cf r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: vpar_headers.c,v 1.73 2001/01/17 18:17:31 massiot Exp $ 
     5 * $Id: vpar_headers.c,v 1.74 2001/01/18 05:13:23 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    4545 
    4646#include "video_decoder.h" 
     47#include "vdec_motion.h" 
    4748#include "../video_decoder/vdec_idct.h" 
    48 #include "../video_decoder/vdec_motion.h" 
    49  
    50 #include "../video_decoder/vpar_blocks.h" 
     49 
     50#include "vpar_blocks.h" 
    5151#include "../video_decoder/vpar_headers.h" 
    5252#include "../video_decoder/vpar_synchro.h" 
  • src/video_parser/vpar_synchro.c

    r3a8481d r647cca0  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999, 2000 VideoLAN 
    5  * $Id: vpar_synchro.c,v 1.77 2001/01/16 18:06:01 massiot Exp $ 
     5 * $Id: vpar_synchro.c,v 1.78 2001/01/18 05:13:23 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    114114 
    115115#include "video_decoder.h" 
     116#include "vdec_motion.h" 
    116117#include "../video_decoder/vdec_idct.h" 
    117 #include "../video_decoder/vdec_motion.h" 
    118  
    119 #include "../video_decoder/vpar_blocks.h" 
     118 
     119#include "vpar_blocks.h" 
    120120#include "../video_decoder/vpar_headers.h" 
    121121#include "../video_decoder/vpar_synchro.h"