]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '746c56b7730ce09397d3a8354acc131285e9d829'
authorClément Bœsch <u@pkh.me>
Mon, 20 Mar 2017 08:07:57 +0000 (09:07 +0100)
committerClément Bœsch <u@pkh.me>
Mon, 20 Mar 2017 08:07:57 +0000 (09:07 +0100)
* commit '746c56b7730ce09397d3a8354acc131285e9d829':
  indeo: Change type of array pitch parameters to ptrdiff_t

Merged-by: Clément Bœsch <u@pkh.me>
1  2 
libavcodec/indeo3.c
libavcodec/ivi.c
libavcodec/ivi.h
libavcodec/ivi_dsp.c
libavcodec/ivi_dsp.h

index e161f83f91f360a0e5c7cf2ba76fc7f84a66014d,89c11e63467ed10575134b6dc89920c4b4149f6d..71d478c9fc5b98c0db1a95de8178f307c3a6323d
@@@ -148,26 -147,16 +148,27 @@@ static av_cold void build_requant_tab(v
  }
  
  
 +static av_cold void free_frame_buffers(Indeo3DecodeContext *ctx)
 +{
 +    int p;
 +
 +    ctx->width = ctx->height = 0;
 +
 +    for (p = 0; p < 3; p++) {
 +        av_freep(&ctx->planes[p].buffers[0]);
 +        av_freep(&ctx->planes[p].buffers[1]);
 +        ctx->planes[p].pixels[0] = ctx->planes[p].pixels[1] = 0;
 +    }
 +}
 +
 +
  static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx,
 -                                          AVCodecContext *avctx)
 +                                          AVCodecContext *avctx, int luma_width, int luma_height)
  {
 -    int p, luma_width, luma_height, chroma_width, chroma_height;
 +    int p, chroma_width, chroma_height;
-     int luma_pitch, chroma_pitch, luma_size, chroma_size;
+     int luma_size, chroma_size;
+     ptrdiff_t luma_pitch, chroma_pitch;
  
 -    luma_width  = ctx->width;
 -    luma_height = ctx->height;
 -
      if (luma_width  < 16 || luma_width  > 640 ||
          luma_height < 16 || luma_height > 480 ||
          luma_width  &  3 || luma_height &   3) {
Simple merge
Simple merge
index 52112695f1b25bd311ea024ea9f246063199f44b,b8a476deb64e3d5342fdf7fdcebaf746d0027f9c..b1c4b45745d6f9c0d270195194316c138c9ada2e
@@@ -37,8 -37,8 +37,8 @@@ void ff_ivi_recompose53(const IVIPlaneD
      int32_t         p0, p1, p2, p3, tmp0, tmp1, tmp2;
      int32_t         b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6;
      int32_t         b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9;
-     int32_t         pitch, back_pitch;
+     ptrdiff_t       pitch, back_pitch;
 -    const short    *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
 +    const short     *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
      const int       num_bands = 4;
  
      /* all bands should have the same pitch */
  }
  
  void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
-                            const int dst_pitch)
+                            const ptrdiff_t dst_pitch)
  {
      int             x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3;
 -    const short    *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
 +    const short     *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
-     int32_t         pitch;
+     ptrdiff_t       pitch;
  
      /* all bands should have the same pitch */
      pitch = plane->bands[0].pitch;
index c38bb3bb385f139973d7620bf742f590554a01d9,d9d3d17f610acb1c648447be1c8ca15050e1bfac..2704d2b9a540d5b9ed0792dc0f46d0d5c2e46514
@@@ -63,12 -64,8 +64,12 @@@ void ff_ivi_recompose_haar(const IVIPla
   *                        != 0 - non_empty column, 0 - empty one
   *                        (this array must be filled by caller)
   */
- void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
+ void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
                               const uint8_t *flags);
 +void ff_ivi_inverse_haar_8x1(const int32_t *in, int16_t *out, uint32_t pitch,
 +                             const uint8_t *flags);
 +void ff_ivi_inverse_haar_1x8(const int32_t *in, int16_t *out, uint32_t pitch,
 +                             const uint8_t *flags);
  
  /**
   *  one-dimensional inverse 8-point Haar transform on rows for Indeo 4