(cherry picked from commit e6d8acf6a8fba4743eb56eabe72a741d1bbee3cb)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
... | ... |
@@ -39,6 +39,9 @@ extern const IVIHuffDesc ff_ivi_blk_huff_desc[8]; ///< static block huffman tabl |
39 | 39 |
VLC ff_ivi_mb_vlc_tabs [8]; |
40 | 40 |
VLC ff_ivi_blk_vlc_tabs[8]; |
41 | 41 |
|
42 |
+typedef void (*ivi_mc_func) (int16_t *buf, const int16_t *ref_buf, |
|
43 |
+ uint32_t pitch, int mc_type); |
|
44 |
+ |
|
42 | 45 |
/** |
43 | 46 |
* Reverse "nbits" bits of the value "val" and return the result |
44 | 47 |
* in the least significant bits. |
... | ... |
@@ -343,8 +346,7 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile) |
343 | 343 |
uint32_t cbp, sym, lo, hi, quant, buf_offs, q; |
344 | 344 |
IVIMbInfo *mb; |
345 | 345 |
RVMapDesc *rvmap = band->rv_map; |
346 |
- void (*mc_with_delta_func)(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type); |
|
347 |
- void (*mc_no_delta_func) (int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type); |
|
346 |
+ ivi_mc_func mc_with_delta_func, mc_no_delta_func; |
|
348 | 347 |
const uint16_t *base_tab; |
349 | 348 |
const uint8_t *scale_tab; |
350 | 349 |
|
... | ... |
@@ -514,8 +516,7 @@ static int ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band, |
514 | 514 |
IVIMbInfo *mb, *ref_mb; |
515 | 515 |
const int16_t *src; |
516 | 516 |
int16_t *dst; |
517 |
- void (*mc_no_delta_func)(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, |
|
518 |
- int mc_type); |
|
517 |
+ ivi_mc_func mc_no_delta_func; |
|
519 | 518 |
|
520 | 519 |
if (tile->num_MBs != IVI_MBs_PER_TILE(tile->width, tile->height, band->mb_size)) { |
521 | 520 |
av_log(avctx, AV_LOG_ERROR, "Allocated tile size %d mismatches " |