00001 /* 00002 * This header is adapted from Accellent by John Dagliesh: 00003 * http://www.defyne.org/dvb/accellent.html 00004 */ 00005 00006 #ifndef __FF_DVDV__ 00007 #define __FF_DVDV__ 00008 00009 /* 00010 Header file containing structures for writing data to Apple's 00011 private hardware MPEG2 decoding API, that I'm calling DVDVideo 00012 */ 00013 00014 #ifdef __cplusplus 00015 extern "C" { 00016 #endif 00017 00018 typedef struct DVDV_MBInfo 00019 { 00020 int16_t frwd_mv[2]; 00021 int16_t back_mv[2]; 00022 int16_t frwd_mv_field[2]; 00023 int16_t back_mv_field[2]; 00024 00025 uint8_t field_select[4]; // 0/1 in order of mvs above 00026 00027 uint8_t mb_type; // |1 = frwd, |2 = back, |4 = use fields 00028 uint8_t ildct; // 0/1 00029 00030 uint8_t num_coded_elts[6]; // for each block incl. dc 00031 } DVDV_MBInfo; 00032 00033 typedef struct DVDV_DCTElt 00034 { 00035 uint8_t run_sub_one; 00036 uint8_t unused; 00037 uint16_t elt; // adjusted for first coded elt in block: 00038 } DVDV_DCTElt; // intra sub 0x0400, else add 0x0400 00039 00040 typedef struct DVDV_Frame 00041 { 00042 int intra_vlc_format; 00043 int alternate_scan; 00044 } DVDV_Frame; 00045 00046 typedef struct DVDV_CurPtrs 00047 { 00048 DVDV_MBInfo * mb; 00049 DVDV_DCTElt * dct; 00050 uint8_t * cbp; 00051 DVDV_Frame * frame; 00052 } DVDV_CurPtrs; 00053 00054 // Convenience macro to get the above from an MpegEncContext 00055 #define DVDV_MB(x) (((DVDV_CurPtrs *)(x->avctx->dvdv))->mb) 00056 #define DVDV_DCT(x) (((DVDV_CurPtrs *)(x->avctx->dvdv))->dct) 00057 #define DVDV_CBP(x) (((DVDV_CurPtrs *)(x->avctx->dvdv))->cbp) 00058 #define DVDV_FRAME(x) (((DVDV_CurPtrs *)(x->avctx->dvdv))->frame) 00059 00060 #ifdef __cplusplus 00061 } 00062 #endif 00063 00064 #endif // __FF_DVDV__
1.5.5