#include "mpegvideo.h"
#include "rectangle.h"
#include "thread.h"
-#include "version.h"
/**
* @param stride the number of MVs to get to the next row
* @param mv_step the number of MVs per row or column in a macroblock
*/
-static void set_mv_strides(ERContext *s, int *mv_step, int *stride)
+static void set_mv_strides(ERContext *s, ptrdiff_t *mv_step, ptrdiff_t *stride)
{
if (s->avctx->codec_id == AV_CODEC_ID_H264) {
assert(s->quarter_sample);
}
}
-static void filter181(int16_t *data, int width, int height, int stride)
+static void filter181(int16_t *data, int width, int height, ptrdiff_t stride)
{
int x, y;
* @param h height in 8 pixel blocks
*/
static void guess_dc(ERContext *s, int16_t *dc, int w,
- int h, int stride, int is_luma)
+ int h, ptrdiff_t stride, int is_luma)
{
int b_x, b_y;
* @param h height in 8 pixel blocks
*/
static void h_block_filter(ERContext *s, uint8_t *dst, int w,
- int h, int stride, int is_luma)
+ int h, ptrdiff_t stride, int is_luma)
{
- int b_x, b_y, mvx_stride, mvy_stride;
+ int b_x, b_y;
+ ptrdiff_t mvx_stride, mvy_stride;
const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
set_mv_strides(s, &mvx_stride, &mvy_stride);
mvx_stride >>= is_luma;
* @param h height in 8 pixel blocks
*/
static void v_block_filter(ERContext *s, uint8_t *dst, int w, int h,
- int stride, int is_luma)
+ ptrdiff_t stride, int is_luma)
{
- int b_x, b_y, mvx_stride, mvy_stride;
+ int b_x, b_y;
+ ptrdiff_t mvx_stride, mvy_stride;
const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
set_mv_strides(s, &mvx_stride, &mvy_stride);
mvx_stride >>= is_luma;
#define MV_FROZEN 3
#define MV_CHANGED 2
#define MV_UNCHANGED 1
- const int mb_stride = s->mb_stride;
+ const ptrdiff_t mb_stride = s->mb_stride;
const int mb_width = s->mb_width;
const int mb_height = s->mb_height;
int i, depth, num_avail;
- int mb_x, mb_y, mot_step, mot_stride;
+ int mb_x, mb_y;
+ ptrdiff_t mot_step, mot_stride;
set_mv_strides(s, &mot_step, &mot_stride);
if (undamaged_count < 5)
return 0; // almost all MBs damaged -> use temporal prediction
-#if FF_API_XVMC
-FF_DISABLE_DEPRECATION_WARNINGS
- // prevent dsp.sad() check, that requires access to the image
- if (CONFIG_MPEG_XVMC_DECODER &&
- s->avctx->xvmc_acceleration &&
- s->cur_pic.f->pict_type == AV_PICTURE_TYPE_I)
- return 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif /* FF_API_XVMC */
-
skip_amount = FFMAX(undamaged_count / 50, 1); // check only up to 50 MBs
is_intra_likely = 0;
} else
guess_mv(s);
-#if FF_API_XVMC
-FF_DISABLE_DEPRECATION_WARNINGS
- /* the filters below are not XvMC compatible, skip them */
- if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration)
- goto ec_clean;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif /* FF_API_XVMC */
/* fill DC for inter blocks */
for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
s->mb_height, linesize[2], 0);
}
-ec_clean:
/* clean a few tables */
for (i = 0; i < s->mb_num; i++) {
const int mb_xy = s->mb_index2xy[i];