summaryrefslogtreecommitdiff
path: root/libavcodec/h264pred.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-10-28 20:44:54 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2012-10-29 17:49:13 -0700
commit95c89da36ebeeb96b7146c0d70f46c582397da7f (patch)
tree564ede5c3001d4932c4304ac1b82ed9e5b0692ae /libavcodec/h264pred.h
parentbad8e33dc92aa2abd39410be86159a1d4336ff90 (diff)
Use ptrdiff_t instead of int for intra pred "stride" function parameter.
This way, SIMD-optimized functions don't have to sign-extend their stride argument manually to be able to do pointer arithmetic.
Diffstat (limited to 'libavcodec/h264pred.h')
-rw-r--r--libavcodec/h264pred.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/libavcodec/h264pred.h b/libavcodec/h264pred.h
index a964ae394b..a8b3dba28b 100644
--- a/libavcodec/h264pred.h
+++ b/libavcodec/h264pred.h
@@ -90,21 +90,23 @@
* Context for storing H.264 prediction functions
*/
typedef struct H264PredContext {
- void(*pred4x4[9 + 3 + 3])(uint8_t *src, const uint8_t *topright, int stride); //FIXME move to dsp?
- void(*pred8x8l[9 + 3])(uint8_t *src, int topleft, int topright, int stride);
- void(*pred8x8[4 + 3 + 4])(uint8_t *src, int stride);
- void(*pred16x16[4 + 3 + 2])(uint8_t *src, int stride);
+ void(*pred4x4[9 + 3 + 3])(uint8_t *src, const uint8_t *topright,
+ ptrdiff_t stride);
+ void(*pred8x8l[9 + 3])(uint8_t *src, int topleft, int topright,
+ ptrdiff_t stride);
+ void(*pred8x8[4 + 3 + 4])(uint8_t *src, ptrdiff_t stride);
+ void(*pred16x16[4 + 3 + 2])(uint8_t *src, ptrdiff_t stride);
void(*pred4x4_add[2])(uint8_t *pix /*align 4*/,
- const DCTELEM *block /*align 16*/, int stride);
+ const DCTELEM *block /*align 16*/, ptrdiff_t stride);
void(*pred8x8l_add[2])(uint8_t *pix /*align 8*/,
- const DCTELEM *block /*align 16*/, int stride);
+ const DCTELEM *block /*align 16*/, ptrdiff_t stride);
void(*pred8x8_add[3])(uint8_t *pix /*align 8*/,
const int *block_offset,
- const DCTELEM *block /*align 16*/, int stride);
+ const DCTELEM *block /*align 16*/, ptrdiff_t stride);
void(*pred16x16_add[3])(uint8_t *pix /*align 16*/,
const int *block_offset,
- const DCTELEM *block /*align 16*/, int stride);
+ const DCTELEM *block /*align 16*/, ptrdiff_t stride);
} H264PredContext;
void ff_h264_pred_init(H264PredContext *h, int codec_id,