* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavcore/imgutils.h"
#include "avcodec.h"
#include "dsputil.h"
#include "binkdata.h"
BINK_SRC_X_OFF, ///< X components of motion value
BINK_SRC_Y_OFF, ///< Y components of motion value
BINK_SRC_INTRA_DC, ///< DC values for intrablocks with DCT
- BINK_SRC_INTER_DC, ///< DC values for intrablocks with DCT
+ BINK_SRC_INTER_DC, ///< DC values for interblocks with DCT
BINK_SRC_RUN, ///< run lengths for special fill block
BINK_NB_SRC
};
/**
- * Initializes length length in all bundles.
+ * Initialize length length in all bundles.
*
* @param c decoder context
* @param width plane width
}
/**
- * Allocates memory for bundles.
+ * Allocate memory for bundles.
*
* @param c decoder context
*/
}
/**
- * Frees memory used by bundles.
+ * Free memory used by bundles.
*
* @param c decoder context
*/
}
/**
- * Merges two consequent lists of equal size depending on bits read.
+ * Merge two consequent lists of equal size depending on bits read.
*
* @param gb context for reading bits
* @param dst buffer where merged list will be written to
}
/**
- * Reads information about Huffman tree used to decode data.
+ * Read information about Huffman tree used to decode data.
*
* @param gb context for reading bits
* @param tree pointer for storing tree data
}
/**
- * Prepares bundle for decoding data.
+ * Prepare bundle for decoding data.
*
* @param gb context for reading bits
* @param c decoder context
}
/**
- * Retrieves next value from bundle.
+ * Retrieve next value from bundle.
*
* @param c decoder context
* @param bundle bundle number
}
/**
- * Reads 8x8 block of DCT coefficients.
+ * Read 8x8 block of DCT coefficients.
*
* @param gb context for reading bits
* @param block place for storing coefficients
}
/**
- * Reads 8x8 block with residue after motion compensation.
+ * Read 8x8 block with residue after motion compensation.
*
* @param gb context for reading bits
* @param block place to store read data
int v, col[2];
const uint8_t *scan;
int xoff, yoff;
- DECLARE_ALIGNED(16, DCTELEM, block[64]);
- DECLARE_ALIGNED(16, uint8_t, ublock[64]);
+ LOCAL_ALIGNED_16(DCTELEM, block, [64]);
+ LOCAL_ALIGNED_16(uint8_t, ublock, [64]);
int coordmap[64];
const int stride = c->pic.linesize[plane_idx];
}
flags = AV_RL32(avctx->extradata);
c->has_alpha = flags & BINK_FLAG_ALPHA;
- c->swap_planes = c->version >= 'i';
+ c->swap_planes = c->version >= 'h';
if (!bink_trees[15].table) {
for (i = 0; i < 16; i++) {
const int maxbits = bink_tree_lens[i][15];
c->pic.data[0] = NULL;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
+ if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
return 1;
}
AVCodec bink_decoder = {
"binkvideo",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_BINKVIDEO,
sizeof(BinkContext),
decode_init,