Commit 0e205605 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'f6f36ca8'

* commit 'f6f36ca8':
  indeo: Refactor ff_ivi_dec_huff_desc

Conflicts:
	libavcodec/ivi_common.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents cced6f4d f6f36ca8
...@@ -157,7 +157,9 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab, ...@@ -157,7 +157,9 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab,
/* select default table */ /* select default table */
huff_tab->tab = (which_tab) ? &ivi_blk_vlc_tabs[7] huff_tab->tab = (which_tab) ? &ivi_blk_vlc_tabs[7]
: &ivi_mb_vlc_tabs [7]; : &ivi_mb_vlc_tabs [7];
} else { return 0;
}
huff_tab->tab_sel = get_bits(gb, 3); huff_tab->tab_sel = get_bits(gb, 3);
if (huff_tab->tab_sel == 7) { if (huff_tab->tab_sel == 7) {
/* custom huffman table (explicitly encoded) */ /* custom huffman table (explicitly encoded) */
...@@ -179,7 +181,8 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab, ...@@ -179,7 +181,8 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab,
result = ivi_create_huff_from_desc(&huff_tab->cust_desc, result = ivi_create_huff_from_desc(&huff_tab->cust_desc,
&huff_tab->cust_tab, 0); &huff_tab->cust_tab, 0);
if (result) { if (result) {
huff_tab->cust_desc.num_rows = 0; // reset faulty description // reset faulty description
huff_tab->cust_desc.num_rows = 0;
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Error while initializing custom vlc table!\n"); "Error while initializing custom vlc table!\n");
return result; return result;
...@@ -191,7 +194,6 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab, ...@@ -191,7 +194,6 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab,
huff_tab->tab = (which_tab) ? &ivi_blk_vlc_tabs[huff_tab->tab_sel] huff_tab->tab = (which_tab) ? &ivi_blk_vlc_tabs[huff_tab->tab_sel]
: &ivi_mb_vlc_tabs [huff_tab->tab_sel]; : &ivi_mb_vlc_tabs [huff_tab->tab_sel];
} }
}
return 0; return 0;
} }
......
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