Commit ed983a14 authored by iive's avatar iive

Rename xvmc to the way michaelni likes it. (xvmc_id)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17341 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6d629e8f
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
void ff_xvmc_init_block(MpegEncContext *s) void ff_xvmc_init_block(MpegEncContext *s)
{ {
struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.data[2]; struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
assert(render && render->unique_id == AV_XVMC_RENDER_MAGIC); assert(render && render->xvmc_id == AV_XVMC_RENDER_MAGIC);
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);
} }
...@@ -76,7 +76,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx) ...@@ -76,7 +76,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx)
const int mb_block_count = 4 + (1 << s->chroma_format); const int mb_block_count = 4 + (1 << s->chroma_format);
assert(avctx); assert(avctx);
if (!render || render->unique_id != AV_XVMC_RENDER_MAGIC || if (!render || render->xvmc_id != AV_XVMC_RENDER_MAGIC ||
!render->data_blocks || !render->mv_blocks) { !render->data_blocks || !render->mv_blocks) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Render token doesn't look as expected.\n"); "Render token doesn't look as expected.\n");
...@@ -108,7 +108,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx) ...@@ -108,7 +108,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx)
next = (struct xvmc_pix_fmt*)s->next_picture.data[2]; next = (struct xvmc_pix_fmt*)s->next_picture.data[2];
if (!next) if (!next)
return -1; return -1;
if (next->unique_id != AV_XVMC_RENDER_MAGIC) if (next->xvmc_id != AV_XVMC_RENDER_MAGIC)
return -1; 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
...@@ -116,7 +116,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx) ...@@ -116,7 +116,7 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx)
last = (struct xvmc_pix_fmt*)s->last_picture.data[2]; last = (struct xvmc_pix_fmt*)s->last_picture.data[2];
if (!last) if (!last)
last = render; // predict second field from the first last = render; // predict second field from the first
if (last->unique_id != AV_XVMC_RENDER_MAGIC) if (last->xvmc_id != AV_XVMC_RENDER_MAGIC)
return -1; return -1;
render->p_past_surface = last->p_surface; render->p_past_surface = last->p_surface;
return 0; return 0;
...@@ -176,7 +176,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s) ...@@ -176,7 +176,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
// start of XVMC-specific code // start of XVMC-specific code
render = (struct xvmc_pix_fmt*)s->current_picture.data[2]; render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
assert(render); assert(render);
assert(render->unique_id == AV_XVMC_RENDER_MAGIC); assert(render->xvmc_id == AV_XVMC_RENDER_MAGIC);
assert(render->mv_blocks); assert(render->mv_blocks);
// take the next free macroblock // take the next free macroblock
......
...@@ -38,7 +38,7 @@ struct xvmc_pix_fmt { ...@@ -38,7 +38,7 @@ struct xvmc_pix_fmt {
Once set these values are not supposed to be modified. Once set these values are not supposed to be modified.
*/ */
//@{ //@{
int unique_id; ///< used as a check against memory corruption by regular pixel routines or other API structure int xvmc_id; ///< used as a check against memory corruption by regular pixel routines or other API structure
short* data_blocks; short* data_blocks;
XvMCMacroBlock* mv_blocks; XvMCMacroBlock* mv_blocks;
......
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