Commit cad1928f authored by Diego Biurrun's avatar Diego Biurrun
Browse files

Give struct members more sensible names:

total_number_of_mv_blocks   --> allocated_mv_blocks
total_number_of_data_blocks --> allocated_data_blocks

Originally committed as revision 17356 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 648410c1
...@@ -89,8 +89,8 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx) ...@@ -89,8 +89,8 @@ int ff_xvmc_field_start(MpegEncContext*s, AVCodecContext *avctx)
render->filled_mv_blocks_num); render->filled_mv_blocks_num);
return -1; return -1;
} }
if (render->total_number_of_mv_blocks < 1 || if (render->allocated_mv_blocks < 1 ||
render->total_number_of_data_blocks < mb_block_count) { render->allocated_data_blocks < mb_block_count) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Rendering surface doesn't provide enough block structures to work with.\n"); "Rendering surface doesn't provide enough block structures to work with.\n");
return -1; return -1;
...@@ -312,13 +312,13 @@ void ff_xvmc_decode_mb(MpegEncContext *s) ...@@ -312,13 +312,13 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
} }
render->filled_mv_blocks_num++; render->filled_mv_blocks_num++;
assert(render->filled_mv_blocks_num <= render->total_number_of_mv_blocks); assert(render->filled_mv_blocks_num <= render->allocated_mv_blocks);
assert(render->next_free_data_block_num <= render->total_number_of_data_blocks); assert(render->next_free_data_block_num <= render->allocated_data_blocks);
/* The above conditions should not be able to fail as long as this function /* The above conditions should not be able to fail as long as this function
* is used and the following 'if ()' automatically calls a callback to free * is used and the following 'if ()' automatically calls a callback to free
* blocks. */ * blocks. */
if (render->filled_mv_blocks_num == render->total_number_of_mv_blocks) if (render->filled_mv_blocks_num == render->allocated_mv_blocks)
ff_draw_horiz_band(s, 0, 0); ff_draw_horiz_band(s, 0, 0);
} }
...@@ -66,13 +66,13 @@ struct xvmc_pix_fmt { ...@@ -66,13 +66,13 @@ struct xvmc_pix_fmt {
- application - set during initialization - application - set during initialization
- libavcodec - unchanged - libavcodec - unchanged
*/ */
int total_number_of_mv_blocks; int allocated_mv_blocks;
/** Number of blocks that can be stored at once in the data_blocks array. /** Number of blocks that can be stored at once in the data_blocks array.
- application - set during initialization - application - set during initialization
- libavcodec - unchanged - libavcodec - unchanged
*/ */
int total_number_of_data_blocks; int allocated_data_blocks;
/** Indicates that the hardware would interpret data_blocks as IDCT /** Indicates that the hardware would interpret data_blocks as IDCT
coefficients and perform IDCT on them. coefficients and perform IDCT on them.
......
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