aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_xvmc.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-02-14 22:21:17 +0000
committerDiego Biurrun <diego@biurrun.de>2009-02-14 22:21:17 +0000
commitb71bd0ed11a743a0490c6318d696dae8f154f43a (patch)
tree550a9bff2e9162c9b0b6a67a7d3ec998aad3830f /libavcodec/mpegvideo_xvmc.c
parent013cebfbe803049f66f227d6352b8334e6adea76 (diff)
downloadffmpeg-b71bd0ed11a743a0490c6318d696dae8f154f43a.tar.gz
Merge some declarations and initializations.
Originally committed as revision 17288 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_xvmc.c')
-rw-r--r--libavcodec/mpegvideo_xvmc.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c
index 2b93661299..dfda2f37ce 100644
--- a/libavcodec/mpegvideo_xvmc.c
+++ b/libavcodec/mpegvideo_xvmc.c
@@ -34,8 +34,7 @@
//set s->block
void ff_xvmc_init_block(MpegEncContext *s)
{
- struct xvmc_render_state *render;
- render = (struct xvmc_render_state*)s->current_picture.data[2];
+ struct xvmc_render_state *render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render);
if (!render || render->magic != AV_XVMC_RENDER_MAGIC) {
assert(0);
@@ -46,10 +45,9 @@ void ff_xvmc_init_block(MpegEncContext *s)
void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)
{
- int i, j;
+ int i, j = 0;
const int mb_block_count = 4 + (1 << s->chroma_format);
- j = 0;
cbp <<= 12-mb_block_count;
for (i = 0; i < mb_block_count; i++) {
if (cbp & (1 << 11))
@@ -64,11 +62,9 @@ void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)
// They should be safe if they are called a few times for the same field!
int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx)
{
- struct xvmc_render_state *render, *last, *next;
+ struct xvmc_render_state *last, *next, *render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(avctx);
-
- render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render);
if (!render || render->magic != AV_XVMC_RENDER_MAGIC)
return -1; // make sure that this is a render packet
@@ -113,8 +109,7 @@ return -1;
void ff_xvmc_field_end(MpegEncContext *s)
{
- struct xvmc_render_state *render;
- render = (struct xvmc_render_state*)s->current_picture.data[2];
+ struct xvmc_render_state *render = (struct xvmc_render_state*)s->current_picture.data[2];
assert(render);
if (render->filled_mv_blocks_num > 0)