diff libavcodec/cell/h264_dma.h @ 2:897f711a7157

rearrange to work with autoconf
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 25 Sep 2012 15:55:33 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libavcodec/cell/h264_dma.h	Tue Sep 25 15:55:33 2012 +0200
     1.3 @@ -0,0 +1,59 @@
     1.4 +#ifndef H264_DMA_H
     1.5 +#define H264_DMA_H
     1.6 +
     1.7 +#include "libavutil/mem.h"
     1.8 +
     1.9 +typedef struct dma_list_elem {
    1.10 +	union {
    1.11 +		unsigned int all32;
    1.12 +		struct {
    1.13 +		unsigned int stall    : 1;
    1.14 +		unsigned int reserved : 15;
    1.15 +		unsigned int nbytes   : 16;
    1.16 +		} bits;
    1.17 +	} size;
    1.18 +	uint64_t ea_low : 32;
    1.19 +}dma_list_elem_t;
    1.20 +
    1.21 +extern DECLARE_ALIGNED_16(dma_list_elem_t, put_list_buf[2*(52+26+26)]);
    1.22 +extern dma_list_elem_t* put_list;
    1.23 +
    1.24 +extern DECLARE_ALIGNED_16(dma_list_elem_t, get_list_buf[16*(4+5 + 2*3)]);
    1.25 +extern dma_list_elem_t* get_list;
    1.26 +
    1.27 +enum{
    1.28 +	MBD_slice=1,
    1.29 +	MBD_buf1,
    1.30 +	MBD_buf2,
    1.31 +	MBD_buf3,
    1.32 +	MBD_put,
    1.33 +	MBD_pic,
    1.34 +	MBD_mc_buf1,
    1.35 +	MBD_mc_buf2
    1.36 +};
    1.37 +
    1.38 +enum{
    1.39 +	ED_spe=1,
    1.40 +	ED_slice,
    1.41 +	ED_raw,
    1.42 +	ED_get,
    1.43 +	ED_get2,
    1.44 +	ED_get_mv,
    1.45 +	ED_put,
    1.46 +	ED_putmb0,
    1.47 +	ED_putmb1,
    1.48 +};
    1.49 +
    1.50 +// Functions to get/put a block from/to main memory
    1.51 +void get_dma_list(void *dst, void* ea, unsigned int w, unsigned int h, unsigned int stride, unsigned int tag, int barrier);
    1.52 +void put_dma_list(void *src, void* ea, unsigned int size, unsigned int h, unsigned int stride, unsigned int tag);
    1.53 +
    1.54 +//Functions to do a dma transfer for 32-bit
    1.55 +void spu_dma_get(void *ls, unsigned ea, int size, int tag);
    1.56 +void spu_dma_put(void *ls, unsigned ea, int size, int tag);
    1.57 +void spu_dma_barrier_put(void *ls, unsigned ea, int size, int tag);
    1.58 +
    1.59 +// Function that wait to finish a DMA transfer with especific id
    1.60 +void wait_dma_id(int id);
    1.61 +
    1.62 +#endif