Commit c96da3ed authored by Diego Biurrun's avatar Diego Biurrun

Avoid POSIX-reserved _t namespace.

Originally committed as revision 16408 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0f0b707f
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
// 1337 IDCT MCo // 1337 IDCT MCo
#define MP_XVMC_RENDER_MAGIC 0x1DC711C0 #define MP_XVMC_RENDER_MAGIC 0x1DC711C0
typedef struct { struct xvmc_render_state {
//these are not changed by the decoder! //these are not changed by the decoder!
int magic; int magic;
...@@ -70,6 +70,6 @@ typedef struct { ...@@ -70,6 +70,6 @@ typedef struct {
//extensions //extensions
void * p_osd_target_surface_render; //pointer to the surface where subpicture is rendered void * p_osd_target_surface_render; //pointer to the surface where subpicture is rendered
} xvmc_render_state_t; };
#endif /* AVCODEC_XVMC_RENDER_H */ #endif /* AVCODEC_XVMC_RENDER_H */
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
//set s->block //set s->block
void XVMC_init_block(MpegEncContext *s){ void XVMC_init_block(MpegEncContext *s){
xvmc_render_state_t * render; struct xvmc_render_state * render;
render = (xvmc_render_state_t*)s->current_picture.data[2]; render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render != NULL); assert(render != NULL);
if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) ){ if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) ){
assert(0); assert(0);
...@@ -69,11 +69,11 @@ const int mb_block_count = 4+(1<<s->chroma_format); ...@@ -69,11 +69,11 @@ const int mb_block_count = 4+(1<<s->chroma_format);
//These functions should be called on every new field and/or frame. //These functions should be called on every new field and/or frame.
//They should be safe if they are called a few times for the same field! //They should be safe if they are called a few times for the same field!
int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx){ int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx){
xvmc_render_state_t * render,* last, * next; struct xvmc_render_state * render, * last, * next;
assert(avctx != NULL); assert(avctx != NULL);
render = (xvmc_render_state_t*)s->current_picture.data[2]; render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render != NULL); assert(render != NULL);
if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) ) if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) )
return -1;//make sure that this is render packet return -1;//make sure that this is render packet
...@@ -91,7 +91,7 @@ xvmc_render_state_t * render,* last, * next; ...@@ -91,7 +91,7 @@ xvmc_render_state_t * render,* last, * next;
case FF_I_TYPE: case FF_I_TYPE:
return 0;// no prediction from other frames return 0;// no prediction from other frames
case FF_B_TYPE: case FF_B_TYPE:
next = (xvmc_render_state_t*)s->next_picture.data[2]; next = (struct xvmc_render_state*)s->next_picture.data[2];
assert(next!=NULL); assert(next!=NULL);
assert(next->state & MP_XVMC_STATE_PREDICTION); assert(next->state & MP_XVMC_STATE_PREDICTION);
if(next == NULL) return -1; if(next == NULL) return -1;
...@@ -99,7 +99,7 @@ xvmc_render_state_t * render,* last, * next; ...@@ -99,7 +99,7 @@ xvmc_render_state_t * render,* last, * next;
render->p_future_surface = next->p_surface; render->p_future_surface = next->p_surface;
//no return here, going to set forward prediction //no return here, going to set forward prediction
case FF_P_TYPE: case FF_P_TYPE:
last = (xvmc_render_state_t*)s->last_picture.data[2]; last = (struct xvmc_render_state*)s->last_picture.data[2];
if(last == NULL)// && !s->first_field) if(last == NULL)// && !s->first_field)
last = render;//predict second field from the first last = render;//predict second field from the first
if(last->magic != MP_XVMC_RENDER_MAGIC) return -1; if(last->magic != MP_XVMC_RENDER_MAGIC) return -1;
...@@ -112,8 +112,8 @@ return -1; ...@@ -112,8 +112,8 @@ return -1;
} }
void XVMC_field_end(MpegEncContext *s){ void XVMC_field_end(MpegEncContext *s){
xvmc_render_state_t * render; struct xvmc_render_state * render;
render = (xvmc_render_state_t*)s->current_picture.data[2]; render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render != NULL); assert(render != NULL);
if(render->filled_mv_blocks_num > 0){ if(render->filled_mv_blocks_num > 0){
...@@ -124,7 +124,7 @@ xvmc_render_state_t * render; ...@@ -124,7 +124,7 @@ xvmc_render_state_t * render;
void XVMC_decode_mb(MpegEncContext *s){ void XVMC_decode_mb(MpegEncContext *s){
XvMCMacroBlock * mv_block; XvMCMacroBlock * mv_block;
xvmc_render_state_t * render; struct xvmc_render_state * render;
int i,cbp,blocks_per_mb; int i,cbp,blocks_per_mb;
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
...@@ -152,7 +152,7 @@ const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; ...@@ -152,7 +152,7 @@ const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
s->current_picture.qscale_table[mb_xy] = s->qscale; s->current_picture.qscale_table[mb_xy] = s->qscale;
//START OF XVMC specific code //START OF XVMC specific code
render = (xvmc_render_state_t*)s->current_picture.data[2]; render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render!=NULL); assert(render!=NULL);
assert(render->magic==MP_XVMC_RENDER_MAGIC); assert(render->magic==MP_XVMC_RENDER_MAGIC);
assert(render->mv_blocks); assert(render->mv_blocks);
......
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