summaryrefslogtreecommitdiff
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-05 01:46:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-05 02:26:17 +0200
commit5d4fd1d1adf1ec17dd19548783f7f2eb0d64225f (patch)
tree0ed0d9be892e55bea47d777dcd78d7c1cf104adf /libavcodec/vp8.c
parent96676e1abfece89e20bc962255b48cb2d9e417bd (diff)
parent3824ef08e0878aa9f100f33ef22b61daf68058c2 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (36 commits) ARM: allow unaligned buffer in fixed-point NEON FFT4 fate: test more FFT etc sizes dca: set AVCodecContext frame_size for DTS audio YASM: Shut up unused variable compiler warning with --disable-yasm. x86_32: Fix build on x86_32 with --disable-yasm. iirfilter: add fate test doxygen: Add qmul docs. ogg: propagate return values and return more meaningful error values H.264: fix overreads of qscale_table Remove unused static tables and static inline functions. eval: clear Parser instances before using dct-test: remove 'ref' function pointer from tables build: Remove deleted 'check' target from .PHONY list. oggdec: Abort Ogg header parsing when encountering a data packet. Add LGPL license boilerplate to files lacking it. mxfenc: small typo fix doxygen: Fix documentation for some VP8 functions. sha: use AV_RB32() instead of assuming buffer can be cast to uint32_t* des: allow unaligned input and output buffers aes: allow unaligned input and output buffers ... Conflicts: libavcodec/dct-test.c libavcodec/libvpxenc.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/h264_qpel_mmx.c libavfilter/x86/gradfun.c libavformat/oggdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index c7d5a56af4..beb4de3185 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -641,8 +641,6 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_
* @param block destination for block coefficients
* @param probs probabilities to use when reading trees from the bitstream
* @param i initial coeff index, 0 unless a separate DC block is coded
- * @param zero_nhood the initial prediction context for number of surrounding
- * all-zero blocks (only left/top, so 0-2)
* @param qmul array holding the dc/ac dequant factor at position 0/1
* @return 0 if no coeffs were decoded
* otherwise, the index of the last coeff decoded plus one
@@ -701,6 +699,17 @@ skip_eob:
}
#endif
+/**
+ * @param c arithmetic bitstream reader context
+ * @param block destination for block coefficients
+ * @param probs probabilities to use when reading trees from the bitstream
+ * @param i initial coeff index, 0 unless a separate DC block is coded
+ * @param zero_nhood the initial prediction context for number of surrounding
+ * all-zero blocks (only left/top, so 0-2)
+ * @param qmul array holding the dc/ac dequant factor at position 0/1
+ * @return 0 if no coeffs were decoded
+ * otherwise, the index of the last coeff decoded plus one
+ */
static av_always_inline
int decode_block_coeffs(VP56RangeCoder *c, DCTELEM block[16],
uint8_t probs[16][3][NUM_DCT_TOKENS-1],
@@ -1034,10 +1043,9 @@ static const uint8_t subpel_idx[3][8] = {
};
/**
- * Generic MC function.
+ * luma MC function
*
* @param s VP8 decoding context
- * @param luma 1 for luma (Y) planes, 0 for chroma (Cb/Cr) planes
* @param dst target buffer for block data at block position
* @param ref reference picture buffer at origin (0, 0)
* @param mv motion vector (relative to block position) to get pixel data from
@@ -1083,6 +1091,23 @@ void vp8_mc_luma(VP8Context *s, uint8_t *dst, AVFrame *ref, const VP56mv *mv,
}
}
+/**
+ * chroma MC function
+ *
+ * @param s VP8 decoding context
+ * @param dst1 target buffer for block data at block position (U plane)
+ * @param dst2 target buffer for block data at block position (V plane)
+ * @param ref reference picture buffer at origin (0, 0)
+ * @param mv motion vector (relative to block position) to get pixel data from
+ * @param x_off horizontal position of block from origin (0, 0)
+ * @param y_off vertical position of block from origin (0, 0)
+ * @param block_w width of block (16, 8 or 4)
+ * @param block_h height of block (always same as block_w)
+ * @param width width of src/dst plane data
+ * @param height height of src/dst plane data
+ * @param linesize size of a single line of plane data, including padding
+ * @param mc_func motion compensation function pointers (bilinear or sixtap MC)
+ */
static av_always_inline
void vp8_mc_chroma(VP8Context *s, uint8_t *dst1, uint8_t *dst2, AVFrame *ref,
const VP56mv *mv, int x_off, int y_off,