mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-18 23:35:06 +02:00
Merge some declarations and initializations.
Originally committed as revision 17288 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
013cebfbe8
commit
b71bd0ed11
@ -34,8 +34,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 = (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) {
|
||||||
assert(0);
|
assert(0);
|
||||||
@ -46,10 +45,9 @@ 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 = 0;
|
||||||
const int mb_block_count = 4 + (1 << s->chroma_format);
|
const int mb_block_count = 4 + (1 << s->chroma_format);
|
||||||
|
|
||||||
j = 0;
|
|
||||||
cbp <<= 12-mb_block_count;
|
cbp <<= 12-mb_block_count;
|
||||||
for (i = 0; i < mb_block_count; i++) {
|
for (i = 0; i < mb_block_count; i++) {
|
||||||
if (cbp & (1 << 11))
|
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!
|
// 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 *last, *next, *render = (struct xvmc_render_state*)s->current_picture.data[2];
|
||||||
|
|
||||||
assert(avctx);
|
assert(avctx);
|
||||||
|
|
||||||
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)
|
||||||
return -1; // make sure that this is a render packet
|
return -1; // make sure that this is a render packet
|
||||||
@ -113,8 +109,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 = (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->filled_mv_blocks_num > 0)
|
if (render->filled_mv_blocks_num > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user