Commit 58fffb02 authored by darkshikari's avatar darkshikari

VC-1/WMV: Remove redundant ff_init_block_index() calls.

These are only supposed to be called once per row, not once per macroblock.
~1.5% faster according to oprofile. 



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19213 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d4d0c09b
...@@ -2617,8 +2617,9 @@ static void vc1_decode_i_blocks(VC1Context *v) ...@@ -2617,8 +2617,9 @@ static void vc1_decode_i_blocks(VC1Context *v)
s->mb_intra = 1; s->mb_intra = 1;
s->first_slice_line = 1; s->first_slice_line = 1;
for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) { for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) {
for(s->mb_x = 0; s->mb_x < s->mb_width; s->mb_x++) { s->mb_x = 0;
ff_init_block_index(s); ff_init_block_index(s);
for(; s->mb_x < s->mb_width; s->mb_x++) {
ff_update_block_index(s); ff_update_block_index(s);
s->dsp.clear_blocks(s->block[0]); s->dsp.clear_blocks(s->block[0]);
mb_pos = s->mb_x + s->mb_y * s->mb_width; mb_pos = s->mb_x + s->mb_y * s->mb_width;
...@@ -2730,8 +2731,9 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) ...@@ -2730,8 +2731,9 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
s->mb_intra = 1; s->mb_intra = 1;
s->first_slice_line = 1; s->first_slice_line = 1;
for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) { for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) {
for(s->mb_x = 0; s->mb_x < s->mb_width; s->mb_x++) { s->mb_x = 0;
ff_init_block_index(s); ff_init_block_index(s);
for(;s->mb_x < s->mb_width; s->mb_x++) {
ff_update_block_index(s); ff_update_block_index(s);
s->dsp.clear_blocks(s->block[0]); s->dsp.clear_blocks(s->block[0]);
mb_pos = s->mb_x + s->mb_y * s->mb_stride; mb_pos = s->mb_x + s->mb_y * s->mb_stride;
...@@ -2849,8 +2851,9 @@ static void vc1_decode_p_blocks(VC1Context *v) ...@@ -2849,8 +2851,9 @@ static void vc1_decode_p_blocks(VC1Context *v)
s->first_slice_line = 1; s->first_slice_line = 1;
memset(v->cbp_base, 0, sizeof(v->cbp_base[0])*2*s->mb_stride); memset(v->cbp_base, 0, sizeof(v->cbp_base[0])*2*s->mb_stride);
for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) { for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) {
for(s->mb_x = 0; s->mb_x < s->mb_width; s->mb_x++) { s->mb_x = 0;
ff_init_block_index(s); ff_init_block_index(s);
for(; s->mb_x < s->mb_width; s->mb_x++) {
ff_update_block_index(s); ff_update_block_index(s);
vc1_decode_p_mb(v); vc1_decode_p_mb(v);
...@@ -2898,8 +2901,9 @@ static void vc1_decode_b_blocks(VC1Context *v) ...@@ -2898,8 +2901,9 @@ static void vc1_decode_b_blocks(VC1Context *v)
s->first_slice_line = 1; s->first_slice_line = 1;
for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) { for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) {
for(s->mb_x = 0; s->mb_x < s->mb_width; s->mb_x++) { s->mb_x = 0;
ff_init_block_index(s); ff_init_block_index(s);
for(; s->mb_x < s->mb_width; s->mb_x++) {
ff_update_block_index(s); ff_update_block_index(s);
vc1_decode_b_mb(v); vc1_decode_b_mb(v);
......
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