diff options
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevc.c | 12 | ||||
-rw-r--r-- | libavcodec/hevc_filter.c | 4 | ||||
-rw-r--r-- | libavcodec/hevcdsp_template.c | 36 |
3 files changed, 26 insertions, 26 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 961991f403..e38d36711e 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -1437,11 +1437,11 @@ static int hls_pcm_sample(HEVCContext *s, int x0, int y0, int log2_cb_size) HEVCLocalContext *lc = &s->HEVClc; GetBitContext gb; int cb_size = 1 << log2_cb_size; - int stride0 = s->frame->linesize[0]; + ptrdiff_t stride0 = s->frame->linesize[0]; + ptrdiff_t stride1 = s->frame->linesize[1]; + ptrdiff_t stride2 = s->frame->linesize[2]; uint8_t *dst0 = &s->frame->data[0][y0 * stride0 + (x0 << s->ps.sps->pixel_shift)]; - int stride1 = s->frame->linesize[1]; uint8_t *dst1 = &s->frame->data[1][(y0 >> s->ps.sps->vshift[1]) * stride1 + ((x0 >> s->ps.sps->hshift[1]) << s->ps.sps->pixel_shift)]; - int stride2 = s->frame->linesize[2]; uint8_t *dst2 = &s->frame->data[2][(y0 >> s->ps.sps->vshift[2]) * stride2 + ((x0 >> s->ps.sps->hshift[2]) << s->ps.sps->pixel_shift)]; int length = cb_size * cb_size * s->ps.sps->pcm.bit_depth + ((cb_size * cb_size) >> 1) * s->ps.sps->pcm.bit_depth_chroma; @@ -1520,7 +1520,7 @@ static void luma_mc(HEVCContext *s, int16_t *dst, ptrdiff_t dststride, if (x_off < extra_left || y_off < extra_top || x_off >= pic_width - block_w - ff_hevc_qpel_extra_after[mx] || y_off >= pic_height - block_h - ff_hevc_qpel_extra_after[my]) { - const int edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; + const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; int offset = extra_top * srcstride + (extra_left << s->ps.sps->pixel_shift); int buf_offset = extra_top * edge_emu_stride + (extra_left << s->ps.sps->pixel_shift); @@ -1575,7 +1575,7 @@ static void chroma_mc(HEVCContext *s, int16_t *dst1, int16_t *dst2, if (x_off < EPEL_EXTRA_BEFORE || y_off < EPEL_EXTRA_AFTER || x_off >= pic_width - block_w - EPEL_EXTRA_AFTER || y_off >= pic_height - block_h - EPEL_EXTRA_AFTER) { - const int edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; + const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; int offset1 = EPEL_EXTRA_BEFORE * (src1stride + (1 << s->ps.sps->pixel_shift)); int buf_offset1 = EPEL_EXTRA_BEFORE * (edge_emu_stride + (1 << s->ps.sps->pixel_shift)); @@ -1687,7 +1687,7 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0, RefPicList *refPicList = s->ref->refPicList; HEVCFrame *ref0, *ref1; - int tmpstride = MAX_PB_SIZE * sizeof(int16_t); + ptrdiff_t tmpstride = MAX_PB_SIZE * sizeof(int16_t); uint8_t *dst0 = POS(0, x0, y0); uint8_t *dst1 = POS(1, x0, y0); diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c index 39ac4eef8e..5037dae7cd 100644 --- a/libavcodec/hevc_filter.c +++ b/libavcodec/hevc_filter.c @@ -172,7 +172,7 @@ static int get_qPy(HEVCContext *s, int xC, int yC) } static void copy_CTB(uint8_t *dst, uint8_t *src, - int width, int height, int stride) + int width, int height, ptrdiff_t stride) { int i; @@ -273,7 +273,7 @@ static void sao_filter_CTB(HEVCContext *s, int x, int y) int chroma = c_idx ? 1 : 0; int x0 = x >> chroma; int y0 = y >> chroma; - int stride = s->frame->linesize[c_idx]; + ptrdiff_t stride = s->frame->linesize[c_idx]; int ctb_size = (1 << (s->ps.sps->log2_ctb_size)) >> s->ps.sps->hshift[c_idx]; int width = FFMIN(ctb_size, (s->ps.sps->width >> s->ps.sps->hshift[c_idx]) - x0); diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c index 076b251344..cd55571290 100644 --- a/libavcodec/hevcdsp_template.c +++ b/libavcodec/hevcdsp_template.c @@ -396,7 +396,7 @@ static void FUNC(sao_edge_filter_0)(uint8_t *_dst, uint8_t *_src, if (sao_eo_class != SAO_EO_VERT) { if (borders[0]) { int offset_val = sao_offset_val[0]; - int y_stride = 0; + ptrdiff_t y_stride = 0; for (y = 0; y < height; y++) { dst[y_stride] = av_clip_pixel(src[y_stride] + offset_val); y_stride += stride; @@ -405,7 +405,7 @@ static void FUNC(sao_edge_filter_0)(uint8_t *_dst, uint8_t *_src, } if (borders[2]) { int offset_val = sao_offset_val[0]; - int x_stride = width - 1; + ptrdiff_t x_stride = width - 1; for (x = 0; x < height; x++) { dst[x_stride] = av_clip_pixel(src[x_stride] + offset_val); x_stride += stride; @@ -422,21 +422,21 @@ static void FUNC(sao_edge_filter_0)(uint8_t *_dst, uint8_t *_src, } if (borders[3]) { int offset_val = sao_offset_val[0]; - int y_stride = stride * (height - 1); + ptrdiff_t y_stride = stride * (height - 1); for (x = init_x; x < width; x++) dst[x + y_stride] = av_clip_pixel(src[x + y_stride] + offset_val); height--; } } { - int y_stride = init_y * stride; + ptrdiff_t y_stride = init_y * stride; int pos_0_0 = pos[sao_eo_class][0][0]; int pos_0_1 = pos[sao_eo_class][0][1]; int pos_1_0 = pos[sao_eo_class][1][0]; int pos_1_1 = pos[sao_eo_class][1][1]; - int y_stride_0_1 = (init_y + pos_0_1) * stride; - int y_stride_1_1 = (init_y + pos_1_1) * stride; + ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride; + ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride; for (y = init_y; y < height; y++) { for (x = init_x; x < width; x++) { int diff0 = CMP(src[x + y_stride], src[x + pos_0_0 + y_stride_0_1]); @@ -503,7 +503,7 @@ static void FUNC(sao_edge_filter_1)(uint8_t *_dst, uint8_t *_src, if (sao_eo_class != SAO_EO_VERT) { if (borders[0]) { int offset_val = sao_offset_val[0]; - int y_stride = 0; + ptrdiff_t y_stride = 0; for (y = 0; y < height; y++) { dst[y_stride] = av_clip_pixel(src[y_stride] + offset_val); y_stride += stride; @@ -512,7 +512,7 @@ static void FUNC(sao_edge_filter_1)(uint8_t *_dst, uint8_t *_src, } if (borders[2]) { int offset_val = sao_offset_val[0]; - int x_stride = width - 1; + ptrdiff_t x_stride = width - 1; for (x = 0; x < height; x++) { dst[x_stride] = av_clip_pixel(src[x_stride] + offset_val); x_stride += stride; @@ -521,14 +521,14 @@ static void FUNC(sao_edge_filter_1)(uint8_t *_dst, uint8_t *_src, } } { - int y_stride = init_y * stride; + ptrdiff_t y_stride = init_y * stride; int pos_0_0 = pos[sao_eo_class][0][0]; int pos_0_1 = pos[sao_eo_class][0][1]; int pos_1_0 = pos[sao_eo_class][1][0]; int pos_1_1 = pos[sao_eo_class][1][1]; - int y_stride_0_1 = (init_y + pos_0_1) * stride; - int y_stride_1_1 = (init_y + pos_1_1) * stride; + ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride; + ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride; for (y = init_y; y < height; y++) { for (x = init_x; x < width; x++) { int diff0 = CMP(src[x + y_stride], src[x + pos_0_0 + y_stride_0_1]); @@ -601,21 +601,21 @@ static void FUNC(sao_edge_filter_2)(uint8_t *_dst, uint8_t *_src, } if (borders[3]) { int offset_val = sao_offset_val[0]; - int y_stride = stride * (height - 1); + ptrdiff_t y_stride = stride * (height - 1); for (x = init_x; x < width; x++) dst[x + y_stride] = av_clip_pixel(src[x + y_stride] + offset_val); height--; } } { - int y_stride = init_y * stride; + ptrdiff_t y_stride = init_y * stride; int pos_0_0 = pos[sao_eo_class][0][0]; int pos_0_1 = pos[sao_eo_class][0][1]; int pos_1_0 = pos[sao_eo_class][1][0]; int pos_1_1 = pos[sao_eo_class][1][1]; - int y_stride_0_1 = (init_y + pos_0_1) * stride; - int y_stride_1_1 = (init_y + pos_1_1) * stride; + ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride; + ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride; for (y = init_y; y < height; y++) { for (x = init_x; x < width; x++) { int diff0 = CMP(src[x + y_stride], src[x + pos_0_0 + y_stride_0_1]); @@ -681,14 +681,14 @@ static void FUNC(sao_edge_filter_3)(uint8_t *_dst, uint8_t *_src, init_y = init_x = 0; { - int y_stride = init_y * stride; + ptrdiff_t y_stride = init_y * stride; int pos_0_0 = pos[sao_eo_class][0][0]; int pos_0_1 = pos[sao_eo_class][0][1]; int pos_1_0 = pos[sao_eo_class][1][0]; int pos_1_1 = pos[sao_eo_class][1][1]; - int y_stride_0_1 = (init_y + pos_0_1) * stride; - int y_stride_1_1 = (init_y + pos_1_1) * stride; + ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride; + ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride; for (y = init_y; y < height; y++) { for (x = init_x; x < width; x++) { |