FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
mpegvideo_xvmc.c File Reference
#include <limits.h>
#include <X11/extensions/XvMC.h>
#include "avcodec.h"
#include "mpegvideo.h"
#include <assert.h>
#include "xvmc.h"
#include "xvmc_internal.h"

Go to the source code of this file.

Functions

void ff_xvmc_init_block (MpegEncContext *s)
 Initialize the block field of the MpegEncContext pointer passed as parameter after making sure that the data is not corrupted.
 
void ff_xvmc_pack_pblocks (MpegEncContext *s, int cbp)
 Fill individual block pointers, so there are no gaps in the data_block array in case not all blocks in the macroblock are coded.
 
int ff_xvmc_field_start (MpegEncContext *s, AVCodecContext *avctx)
 Find and store the surfaces that are used as reference frames.
 
void ff_xvmc_field_end (MpegEncContext *s)
 Complete frame/field rendering by passing any remaining blocks.
 
void ff_xvmc_decode_mb (MpegEncContext *s)
 Synthesize the data needed by XvMC to render one macroblock of data.
 

Function Documentation

void ff_xvmc_init_block ( MpegEncContext s)

Initialize the block field of the MpegEncContext pointer passed as parameter after making sure that the data is not corrupted.

In order to implement something like direct rendering instead of decoding coefficients in s->blocks and then copying them, copy them directly into the data_blocks array provided by xvmc.

Definition at line 41 of file mpegvideo_xvmc.c.

Referenced by mpeg_decode_slice().

void ff_xvmc_pack_pblocks ( MpegEncContext s,
int  cbp 
)

Fill individual block pointers, so there are no gaps in the data_block array in case not all blocks in the macroblock are coded.

Definition at line 53 of file mpegvideo_xvmc.c.

Referenced by mpeg_decode_mb().

int ff_xvmc_field_start ( MpegEncContext s,
AVCodecContext avctx 
)

Find and store the surfaces that are used as reference frames.

This function should be called for every new field and/or frame. It should be safe to call the function a few times for the same field.

Definition at line 73 of file mpegvideo_xvmc.c.

Referenced by ff_MPV_frame_start(), and mpeg_field_start().

void ff_xvmc_field_end ( MpegEncContext s)

Complete frame/field rendering by passing any remaining blocks.

Normally ff_draw_horiz_band() is called for each slice, however, some leftover blocks, for example from error_resilience(), may remain. It should be safe to call the function a few times for the same field.

Definition at line 141 of file mpegvideo_xvmc.c.

Referenced by ff_MPV_frame_end(), and slice_end().

void ff_xvmc_decode_mb ( MpegEncContext s)

Synthesize the data needed by XvMC to render one macroblock of data.

Fill all relevant fields, if necessary do IDCT.

Definition at line 154 of file mpegvideo_xvmc.c.

Referenced by MPV_decode_mb_internal().