whitespace cosmetics: consistent (more or less) K&R style
Originally committed as revision 17234 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -36,7 +36,8 @@
|
|||||||
#include "xvmc.h"
|
#include "xvmc.h"
|
||||||
|
|
||||||
//set s->block
|
//set s->block
|
||||||
void XVMC_init_block(MpegEncContext *s){
|
void XVMC_init_block(MpegEncContext *s)
|
||||||
|
{
|
||||||
struct xvmc_render_state * render;
|
struct xvmc_render_state * render;
|
||||||
render = (struct xvmc_render_state*)s->current_picture.data[2];
|
render = (struct xvmc_render_state*)s->current_picture.data[2];
|
||||||
assert(render != NULL);
|
assert(render != NULL);
|
||||||
@@ -47,7 +48,8 @@ void XVMC_init_block(MpegEncContext *s){
|
|||||||
s->block =(DCTELEM *)(render->data_blocks+(render->next_free_data_block_num)*64);
|
s->block =(DCTELEM *)(render->data_blocks+(render->next_free_data_block_num)*64);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XVMC_pack_pblocks(MpegEncContext *s, int cbp){
|
void XVMC_pack_pblocks(MpegEncContext *s, int cbp)
|
||||||
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
const int mb_block_count = 4 + (1 << s->chroma_format);
|
const int mb_block_count = 4 + (1 << s->chroma_format);
|
||||||
|
|
||||||
@@ -65,7 +67,8 @@ void XVMC_pack_pblocks(MpegEncContext *s, int cbp){
|
|||||||
|
|
||||||
//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)
|
||||||
|
{
|
||||||
struct xvmc_render_state * render, * last, * next;
|
struct xvmc_render_state * render, * last, * next;
|
||||||
|
|
||||||
assert(avctx != NULL);
|
assert(avctx != NULL);
|
||||||
@@ -91,15 +94,18 @@ int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx){
|
|||||||
next = (struct xvmc_render_state*)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)
|
||||||
if(next->magic != MP_XVMC_RENDER_MAGIC) return -1;
|
return -1;
|
||||||
|
if (next->magic != MP_XVMC_RENDER_MAGIC)
|
||||||
|
return -1;
|
||||||
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 = (struct xvmc_render_state*)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;
|
||||||
assert(last->state & MP_XVMC_STATE_PREDICTION);
|
assert(last->state & MP_XVMC_STATE_PREDICTION);
|
||||||
render->p_past_surface = last->p_surface;
|
render->p_past_surface = last->p_surface;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -108,17 +114,18 @@ int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx){
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XVMC_field_end(MpegEncContext *s){
|
void XVMC_field_end(MpegEncContext *s)
|
||||||
|
{
|
||||||
struct xvmc_render_state * render;
|
struct xvmc_render_state * render;
|
||||||
render = (struct xvmc_render_state*)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)
|
||||||
ff_draw_horiz_band(s,0,0);
|
ff_draw_horiz_band(s,0,0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void XVMC_decode_mb(MpegEncContext *s){
|
void XVMC_decode_mb(MpegEncContext *s)
|
||||||
|
{
|
||||||
XvMCMacroBlock * mv_block;
|
XvMCMacroBlock * mv_block;
|
||||||
struct xvmc_render_state * render;
|
struct xvmc_render_state * render;
|
||||||
int i,cbp,blocks_per_mb;
|
int i,cbp,blocks_per_mb;
|
||||||
@@ -226,10 +233,14 @@ void XVMC_decode_mb(MpegEncContext *s){
|
|||||||
|
|
||||||
//set correct field references
|
//set correct field references
|
||||||
if (s->mv_type == MV_TYPE_FIELD || s->mv_type == MV_TYPE_16X8) {
|
if (s->mv_type == MV_TYPE_FIELD || s->mv_type == MV_TYPE_16X8) {
|
||||||
if( s->field_select[0][0] ) mv_block->motion_vertical_field_select|=1;
|
if (s->field_select[0][0])
|
||||||
if( s->field_select[1][0] ) mv_block->motion_vertical_field_select|=2;
|
mv_block->motion_vertical_field_select |= 1;
|
||||||
if( s->field_select[0][1] ) mv_block->motion_vertical_field_select|=4;
|
if (s->field_select[1][0])
|
||||||
if( s->field_select[1][1] ) mv_block->motion_vertical_field_select|=8;
|
mv_block->motion_vertical_field_select |= 2;
|
||||||
|
if (s->field_select[0][1])
|
||||||
|
mv_block->motion_vertical_field_select |= 4;
|
||||||
|
if (s->field_select[1][1])
|
||||||
|
mv_block->motion_vertical_field_select |= 8;
|
||||||
}
|
}
|
||||||
}//!intra
|
}//!intra
|
||||||
//time to handle data blocks;
|
//time to handle data blocks;
|
||||||
|
Reference in New Issue
Block a user