Changeset 5c0e385a484c1f28ebf9e2a4b33ecbdf07959a8f

Show
Ignore:
Timestamp:
05/04/07 14:09:00 (2 years ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1175774940 +0000
git-parent:

[f4e4859fd74264e27f3e1c29fef6a46abc603610]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1175774940 +0000
Message:

Various compile fixes for modules/codec/xvmc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/xvmc/accel_xvmc.h

    r3f8b630 r5c0e385  
    3939extern "C" { 
    4040#endif 
    41  
    4241 
    4342typedef struct vlc_macroblock_s 
  • modules/codec/xvmc/decode.c

    rd3fe7f2 r5c0e385  
    2222 */ 
    2323 
     24#include <vlc/vlc.h> 
     25#include <vlc_vout.h> 
     26 
    2427#include "xxmc-config.h" 
    2528 
     
    3134#include "attributes.h" 
    3235#include "mpeg2_internal.h" 
     36#include "xvmc_vld.h" 
    3337 
    3438static int mpeg2_accels = 0; 
     
    174178    while(1) 
    175179    { 
    176         while( (unsignedint) (mpeg2dec->code - mpeg2dec->first_decode_slice) 
     180        while( (unsigned int) (mpeg2dec->code - mpeg2dec->first_decode_slice) 
    177181                 < mpeg2dec->nb_decode_slices ) 
    178182        { 
     
    204208            } 
    205209            mpeg2dec->bytes_since_tag += copied; 
    206             mpeg2_xxmc_slice( &(mpeg2dec->decoder), NULL, 
     210            mpeg2_xxmc_slice( mpeg2dec, NULL, 
    207211                              mpeg2dec->code,mpeg2dec->chunk_start, 
    208212                              mpeg2dec->chunk_size); 
  • modules/codec/xvmc/header.c

    rd3fe7f2 r5c0e385  
    2323 */ 
    2424 
     25#include <vlc/vlc.h> 
     26 
     27#include <inttypes.h> 
     28#include <stdlib.h> /* defines NULL */ 
     29#include <string.h> /* memcmp */ 
     30 
    2531#include "xxmc-config.h" 
    26  
    27 #include <inttypes.h> 
    28 #include <stdlib.h> /* defines NULL */ 
    29 #include <string.h> /* memcmp */ 
    3032 
    3133#include "mpeg2.h" 
     
    661663        picture->display_offset[i].x = mpeg2dec->display_offset_x = x >> 1; 
    662664        picture->display_offset[i].y = mpeg2dec->display_offset_y = y >> 1; 
    663         } 
    664665    } 
    665666    for( ; i < 3; i++ ) 
  • modules/codec/xvmc/mpeg2.h

    rd3fe7f2 r5c0e385  
    5959    uint8_t transfer_characteristics; 
    6060    uint8_t matrix_coefficients; 
    61     int aspect_ratio_information;     
     61    int aspect_ratio_information; 
    6262} mpeg2_sequence_t; 
    6363 
  • modules/codec/xvmc/slice_xvmc_vld.c

    rea82a40 r5c0e385  
    1717 * 
    1818 */ 
    19   
     19 
    2020#include <vlc/vlc.h> 
    2121#include <vlc_vout.h> 
     
    4848}; 
    4949 
    50  
    51  
    52  
    53 void mpeg2_xxmc_choose_coding(decoder_t *p_dec, mpeg2_decoder_t * const decoder, picture_t *picture, 
    54                   double aspect_ratio, int flags)  
     50void mpeg2_xxmc_choose_coding(decoder_t *p_dec, 
     51        mpeg2_decoder_t * const decoder, picture_t *picture, 
     52        double aspect_ratio, int flags) 
    5553{ 
    5654    if (picture) 
     
    5856        //vlc_fourcc_t decoder_format = picture->format.i_chroma; 
    5957        //if (decoder_format == VLC_FOURCC('X','x','M','C')) { 
    60         vlc_xxmc_t *xxmc = (vlc_xxmc_t *) picture->p_accel_data; 
     58        vlc_xxmc_t *xxmc = (vlc_xxmc_t *) picture->p_data; 
    6159 
    6260        /* 
     
    8987} 
    9088 
    91 void mpeg2_xxmc_slice( mpeg2dec_t *mpeg2dec, picture_t *picture, int code, 
    92                uint8_t *buffer, int size)  
     89void mpeg2_xxmc_slice( mpeg2dec_t *mpeg2dec, picture_t *picture, 
     90                        int code, uint8_t *buffer, int size) 
    9391{ 
    9492    mpeg2_decoder_t * const decoder = &(mpeg2dec->decoder); 
    9593    picture = (picture_t *)mpeg2dec->fbuf[0]->id; 
    96     vlc_xxmc_t *xxmc = (vlc_xxmc_t *) picture->p_accel_data; 
     94    vlc_xxmc_t *xxmc = (vlc_xxmc_t *) picture->p_data; 
    9795    vlc_vld_frame_t *vft = &xxmc->vld_frame; 
    9896    unsigned mb_frame_height; 
     
    188186    int i=0; 
    189187    if ( vft->forward_reference_picture != NULL && ((vlc_xxmc_t *) 
    190          vft->forward_reference_picture->p_accel_data)->slice_data_size > 10) 
     188         vft->forward_reference_picture->p_data)->slice_data_size > 10) 
    191189    { 
    192190        printf("\nFORWARD SLICE DATA !!!! size=%d\n", ((vlc_xxmc_t *) 
    193                vft->forward_reference_picture->p_accel_data)->slice_data_size); 
     191               vft->forward_reference_picture->p_data)->slice_data_size); 
    194192        for (i=0;i<10;i++) 
    195193        { 
    196             printf("%d ", *(((vlc_xxmc_t *) vft->forward_reference_picture->p_accel_data)->slice_data+i)); 
     194            printf("%d ", *(((vlc_xxmc_t *) vft->forward_reference_picture->p_data)->slice_data+i)); 
    197195        } 
    198196        printf("\nFORWARD SLICE DATA END!!!!\n"); 
    199197    } 
    200198    if ( vft->backward_reference_picture != NULL && ((vlc_xxmc_t *) 
    201          vft->backward_reference_picture->p_accel_data)->slice_data_size > 10) 
     199         vft->backward_reference_picture->p_data)->slice_data_size > 10) 
    202200    { 
    203201        printf("\nBACKWARD SLICE DATA !!!! size=%d\n", ((vlc_xxmc_t *) 
    204                vft->backward_reference_picture->p_accel_data)->slice_data_size); 
     202               vft->backward_reference_picture->p_data)->slice_data_size); 
    205203        for (i=0;i<10;i++) 
    206204        { 
    207             printf("%d ", *(((vlc_xxmc_t *) vft->backward_reference_picture->p_accel_data)->slice_data+i)); 
     205            printf("%d ", *(((vlc_xxmc_t *) vft->backward_reference_picture->p_data)->slice_data+i)); 
    208206        } 
    209207        printf("\nBACKWARD SLICE DATA END!!!!\n"); 
     
    281279void mpeg2_xxmc_vld_frame_complete(mpeg2dec_t *mpeg2dec, picture_t *picture, int code)  
    282280{ 
    283     vlc_xxmc_t *xxmc = (vlc_xxmc_t *) picture->p_accel_data; 
     281    vlc_xxmc_t *xxmc = (vlc_xxmc_t *) picture->p_data; 
    284282    vlc_vld_frame_t *vft = &xxmc->vld_frame; 
    285283 
  • modules/codec/xvmc/xxmc.c

    rea82a40 r5c0e385  
    2929#include <vlc_vout.h> 
    3030#include <vlc_codec.h> 
    31  
     31#include <vlc_vout_synchro.h> 
     32 
     33#include <stdio.h> 
     34#include <unistd.h> 
    3235#include <mcheck.h> 
    3336 
     
    3639#include "mpeg2_internal.h" 
    3740#include "xvmc_vld.h" 
    38  
    39 #include "vout_synchro.h" 
    4041 
    4142/* Aspect ratio (ISO/IEC 13818-2 section 6.3.3, table 6-3) */ 
     
    4546#define AR_221_1_PICTURE        4                  /* 2.21:1 picture (movie) */ 
    4647 
    47 #include <unistd.h> 
    4848/***************************************************************************** 
    4949 * decoder_sys_t : libmpeg2 decoder descriptor 
     
    6161     * Input properties 
    6262     */ 
    63     pes_packet_t     *p_pes;                  /* current PES we are decoding */ 
    6463    mtime_t          i_pts; 
    6564    mtime_t          i_previous_pts; 
    6665    mtime_t          i_current_pts; 
    6766    mtime_t          i_previous_dts; 
    68     mtime_t          i_current_dts;     
     67    mtime_t          i_current_dts; 
    6968    int              i_current_rate; 
    7069    picture_t *      p_picture_to_destroy; 
     
    7877     */ 
    7978    vout_synchro_t *p_synchro; 
    80     int i_aspect; 
    81     mtime_t        i_last_frame_pts;    
     79    int            i_aspect; 
     80    mtime_t        i_last_frame_pts; 
    8281 
    8382}; 
     
    111110 
    112111    decoder_t *p_dec = (decoder_t*)p_this; 
    113     decoder_sys_t *p_sys
     112    decoder_sys_t *p_sys = NULL
    114113    uint32_t i_accel = 0; 
    115114    FILE *f_wd_dec;  
     
    131130 
    132131    /* Allocate the memory needed to store the decoder's structure */ 
    133     if( ( p_dec->p_sys = p_sys = 
    134           (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL
     132    p_dec->p_sys = p_sys = (decoder_sys_t *)malloc(sizeof(decoder_sys_t)); 
     133    if( !p_sys
    135134    { 
    136135        msg_Err( p_dec, "out of memory" ); 
     
    140139    /* Initialize the thread properties */ 
    141140    memset( p_sys, 0, sizeof(decoder_sys_t) ); 
    142     p_sys->p_pes      = NULL; 
    143141    p_sys->p_mpeg2dec = NULL; 
    144142    p_sys->p_synchro  = NULL; 
     
    155153 
    156154#if defined( __i386__ ) 
    157     if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_MMX ) 
     155    if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX ) 
    158156    { 
    159157        i_accel |= MPEG2_ACCEL_X86_MMX; 
    160158    } 
    161159 
    162     if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW ) 
     160    if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW ) 
    163161    { 
    164162        i_accel |= MPEG2_ACCEL_X86_3DNOW; 
    165163    } 
    166164 
    167     if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT ) 
     165    if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT ) 
    168166    { 
    169167        i_accel |= MPEG2_ACCEL_X86_MMXEXT; 
     
    171169 
    172170#elif defined( __powerpc__ ) || defined( SYS_DARWIN ) 
    173     if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_ALTIVEC ) 
     171    if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC ) 
    174172    { 
    175173        i_accel |= MPEG2_ACCEL_PPC_ALTIVEC; 
     
    275273                    { 
    276274                        vout_SynchroNewPicture( p_sys->p_synchro, 
    277                             I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate ); 
     275                            I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, 
     276                            p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); 
    278277                        vout_SynchroDecode( p_sys->p_synchro ); 
    279278                        vout_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); 
     
    393392                        p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE, 
    394393                        p_sys->p_info->current_picture->nb_fields, 
    395                         0, 0, p_sys->i_current_rate ); 
     394                        0, 0, p_sys->i_current_rate, 
     395                        p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); 
    396396 
    397397                if( p_sys->b_skip ) 
     
    418418                    msg_Dbg( p_dec, "intra-slice refresh stream" ); 
    419419                    vout_SynchroNewPicture( p_sys->p_synchro, 
    420                         I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate ); 
     420                        I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, 
     421                        p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); 
    421422                    vout_SynchroDecode( p_sys->p_synchro ); 
    422423                    vout_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); 
     
    452453                    p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE, 
    453454                    p_sys->p_info->current_picture->nb_fields, i_pts, 
    454                     0, p_sys->i_current_rate ); 
     455                    0, p_sys->i_current_rate, 
     456                    p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); 
    455457 
    456458                if ( !(p_sys->b_slice_i 
     
    460462                                p_sys->p_info->current_picture->flags 
    461463                                    & PIC_MASK_CODING_TYPE, 
    462                                 /*FindVout(p_dec)->render_time*/ 0 /*FIXME*/ ) ) 
     464                                /*FindVout(p_dec)->render_time*/ 0 /*FIXME*/, 
     465                                p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ) ) 
    463466                { 
    464467                    mpeg2_skip( p_sys->p_mpeg2dec, 1 ); 
     
    588591                { 
    589592                    vout_SynchroNewPicture( p_sys->p_synchro, 
    590                                 I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate ); 
     593                        I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, 
     594                        p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); 
    591595                    vout_SynchroDecode( p_sys->p_synchro ); 
    592596                    vout_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); 
     
    669673    decoder_sys_t *p_sys = p_dec->p_sys; 
    670674    picture_t *p_pic; 
    671     static int nbpic = 0; 
    672675 
    673676    p_dec->fmt_out.video.i_width = p_sys->p_info->sequence->width;