Commit 7e2e870e authored by Diego Biurrun's avatar Diego Biurrun

some more K&R whitespace cosmetics

Originally committed as revision 17270 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a26b51cd
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
//set s->block //set s->block
void ff_xvmc_init_block(MpegEncContext *s) void ff_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); assert(render);
if (!render || render->magic != AV_XVMC_RENDER_MAGIC) { if (!render || render->magic != AV_XVMC_RENDER_MAGIC) {
...@@ -45,7 +45,7 @@ void ff_xvmc_init_block(MpegEncContext *s) ...@@ -45,7 +45,7 @@ void ff_xvmc_init_block(MpegEncContext *s)
void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp) void ff_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);
j = 0; j = 0;
...@@ -63,7 +63,7 @@ void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp) ...@@ -63,7 +63,7 @@ void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)
// 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 ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx) int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx)
{ {
struct xvmc_render_state * render, * last, * next; struct xvmc_render_state *render, *last, *next;
assert(avctx); assert(avctx);
...@@ -81,7 +81,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx) ...@@ -81,7 +81,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx)
render->p_future_surface = NULL; render->p_future_surface = NULL;
render->p_past_surface = NULL; render->p_past_surface = NULL;
switch(s->pict_type){ switch(s->pict_type) {
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:
...@@ -108,7 +108,7 @@ return -1; ...@@ -108,7 +108,7 @@ return -1;
void ff_xvmc_field_end(MpegEncContext *s) void ff_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); assert(render);
...@@ -118,9 +118,9 @@ void ff_xvmc_field_end(MpegEncContext *s) ...@@ -118,9 +118,9 @@ void ff_xvmc_field_end(MpegEncContext *s)
void ff_xvmc_decode_mb(MpegEncContext *s) void ff_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;
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;
...@@ -148,7 +148,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s) ...@@ -148,7 +148,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
// start of XVMC-specific code // start of XVMC-specific code
render = (struct xvmc_render_state*)s->current_picture.data[2]; render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render); assert(render);
assert(render->magic==AV_XVMC_RENDER_MAGIC); assert(render->magic == AV_XVMC_RENDER_MAGIC);
assert(render->mv_blocks); assert(render->mv_blocks);
// take the next free macroblock // take the next free macroblock
...@@ -225,9 +225,9 @@ void ff_xvmc_decode_mb(MpegEncContext *s) ...@@ -225,9 +225,9 @@ void ff_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) {
mv_block->motion_vertical_field_select |= s->field_select[0][0]; mv_block->motion_vertical_field_select |= s->field_select[0][0];
mv_block->motion_vertical_field_select |= s->field_select[1][0]<<1; mv_block->motion_vertical_field_select |= s->field_select[1][0] << 1;
mv_block->motion_vertical_field_select |= s->field_select[0][1]<<2; mv_block->motion_vertical_field_select |= s->field_select[0][1] << 2;
mv_block->motion_vertical_field_select |= s->field_select[1][1]<<3; mv_block->motion_vertical_field_select |= s->field_select[1][1] << 3;
} }
} // !intra } // !intra
// time to handle data blocks // time to handle data blocks
...@@ -249,7 +249,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s) ...@@ -249,7 +249,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
if (s->flags & CODEC_FLAG_GRAY) { if (s->flags & CODEC_FLAG_GRAY) {
if (s->mb_intra) { // intra frames are always full chroma blocks if (s->mb_intra) { // intra frames are always full chroma blocks
for (i = 4; i < blocks_per_mb; i++) { for (i = 4; i < blocks_per_mb; i++) {
memset(s->pblocks[i],0,sizeof(short)*8*8); // so we need to clear them memset(s->pblocks[i], 0, sizeof(short)*8*8); // so we need to clear them
if (!render->unsigned_intra) if (!render->unsigned_intra)
s->pblocks[i][0] = 1 << 10; s->pblocks[i][0] = 1 << 10;
} }
...@@ -289,5 +289,5 @@ void ff_xvmc_decode_mb(MpegEncContext *s) ...@@ -289,5 +289,5 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
if (render->filled_mv_blocks_num >= render->total_number_of_mv_blocks) if (render->filled_mv_blocks_num >= render->total_number_of_mv_blocks)
ff_draw_horiz_band(s,0,0); ff_draw_horiz_band(s, 0, 0);
} }
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