]> git.sesse.net Git - ffmpeg/commitdiff
Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Oct 2012 13:02:35 +0000 (15:02 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Oct 2012 13:02:35 +0000 (15:02 +0200)
* qatar/master:
  configure: fix tests for 2-arg math functions
  doc: git-howto: Clarify comment about pushing series of commits
  ivi_common: Drop unused function parameter from decode_band()
  cook: Remove some silly Doxygen comments
  cook: Remove senseless maybe_reformat_buffer32() function
  cook: cosmetics: Better names for joint_decode() function parameters
  cook: cosmetics: Better name for ccpl COOKSubpacket member
  doxygen: Add av_alloc_size to list of predefined macros
  doxygen: Drop some pointless entries from PREDEFINED macros list
  h263: avoid memcpys over array bound in motion vector caching for obmc

Conflicts:
configure
doc/git-howto.texi
libavcodec/cook.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
configure
doc/Doxyfile
libavcodec/cook.c
libavcodec/ivi_common.c
libavcodec/mpegvideo_motion.c

diff --cc configure
index 65562516a8219057afc49559cc004459e58f3f33,81f945fe264f04ef695b4740c703691838b9190d..7f9fe4f0b7ccc632ded2cbad0eaef8ae9d3e7b08
+++ b/configure
@@@ -852,24 -785,14 +852,14 @@@ EO
  check_mathfunc(){
      log check_mathfunc "$@"
      func=$1
-     shift
-     disable $func
-     check_ld "cc" "$@" <<EOF && enable $func
- #include <math.h>
- float foo(float f) { return $func(f); }
- int main(void){ return (int) foo; }
- EOF
- }
- check_math2func(){
-     log check_math2func "$@"
-     func=$1
-     shift
+     narg=$2
+     shift 2
+     test $narg = 2 && args="f, g" || args="f"
      disable $func
 -    check_ld "$@" <<EOF && enable $func
 +    check_ld "cc" "$@" <<EOF && enable $func
  #include <math.h>
- float foo(float f) { return $func(f, f); }
+ float foo(float f, float g) { return $func($args); }
 -int main(void){ return 0; }
 +int main(void){ return (int) foo; }
  EOF
  }
  
@@@ -3663,20 -3305,15 +3649,20 @@@ for thread in $THREADS_LIST; d
      fi
  done
  
 +if enabled pthreads; then
 +  check_func pthread_cancel
 +fi
 +
  check_lib math.h sin -lm && LIBM="-lm"
 +disabled crystalhd || check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd || disable crystalhd
  enabled vaapi && require vaapi va/va.h vaInitialize -lva
  
- for func in $MATH_FUNCS; do
-     check_mathfunc $func
- done
+ atan2f_args=2
+ ldexpf_args=2
+ powf_args=2
  
- for func in $MATH2_FUNCS; do
-     check_math2func $func
+ for func in $MATH_FUNCS; do
+     eval check_mathfunc $func \${${func}_args:-1}
  done
  
  # these are off by default, so fail if requested and not available
diff --cc doc/Doxyfile
Simple merge
index ac2d502a7adf6987e12b8d5027f165c331ba215f,a45bd802800b14ecc8b06fd9085b5ac1eeefeb1f..ea8aad62efaf78435c8f31c372c12adde6384707
@@@ -756,9 -738,8 +742,8 @@@ static void imlt_gain(COOKContext *q, f
   *
   * @param q                 pointer to the COOKContext
   * @param decouple_tab      decoupling array
-  *
   */
 -static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
 +static int decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
  {
      int i;
      int vlc    = get_bits1(&q->gb);
  
      if (vlc)
          for (i = 0; i < length; i++)
-             decouple_tab[start + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2);
+             decouple_tab[start + i] = get_vlc2(&q->gb,
+                                                p->channel_coupling.table,
+                                                p->channel_coupling.bits, 2);
      else
 -        for (i = 0; i < length; i++)
 -            decouple_tab[start + i] = get_bits(&q->gb, p->js_vlc_bits);
 +        for (i = 0; i < length; i++) {
 +            int v = get_bits(&q->gb, p->js_vlc_bits);
 +            if (v == (1<<p->js_vlc_bits)-1) {
 +                av_log(q->avctx, AV_LOG_ERROR, "decouple value too large\n");
 +                return AVERROR_INVALIDDATA;
 +            }
 +            decouple_tab[start + i] = v;
 +        }
 +    return 0;
  }
  
  /*
@@@ -830,12 -806,12 +817,12 @@@ static int joint_decode(COOKContext *q
      memset(decode_buffer, 0, sizeof(q->decode_buffer_0));
  
      /* Make sure the buffers are zeroed out. */
-     memset(mlt_buffer1, 0, 1024 * sizeof(*mlt_buffer1));
-     memset(mlt_buffer2, 0, 1024 * sizeof(*mlt_buffer2));
+     memset(mlt_buffer_left,  0, 1024 * sizeof(*mlt_buffer_left));
+     memset(mlt_buffer_right, 0, 1024 * sizeof(*mlt_buffer_right));
 -    decouple_info(q, p, decouple_tab);
 +    if ((res = decouple_info(q, p, decouple_tab)) < 0)
 +        return res;
      if ((res = mono_decode(q, p, decode_buffer)) < 0)
          return res;
 -
      /* The two channels are stored interleaved in decode_buffer. */
      for (i = 0; i < p->js_subband_start; i++) {
          for (j = 0; j < SUBBAND_SIZE; j++) {
index 17d8af4102a5678a8aa411a93310160b4b7de973,85661281ad5770042239bb6a967b648a59b78bda..e261dca418dce20d4a4c1aa0e4e1dcde677320ea
@@@ -788,10 -773,9 +788,10 @@@ int ff_ivi_decode_frame(AVCodecContext 
      //{ START_TIMER;
  
      if (ctx->is_nonnull_frame(ctx)) {
 +        ctx->buf_invalid[ctx->dst_buf] = 1;
          for (p = 0; p < 3; p++) {
              for (b = 0; b < ctx->planes[p].num_bands; b++) {
-                 result = decode_band(ctx, p, &ctx->planes[p].bands[b], avctx);
+                 result = decode_band(ctx, &ctx->planes[p].bands[b], avctx);
                  if (result) {
                      av_log(avctx, AV_LOG_ERROR,
                             "Error while decoding band: %d, plane: %d\n", b, p);
index 2e5f7e611ecee6ab1717a9bf529aeb79ca1f9221,91687931834f5c38167e7f934ec86b9e22e792ad..261fc1c405edd4095d7f3e92e44514a31550778b
@@@ -644,19 -644,26 +645,26 @@@ static av_always_inline void MPV_motion
          const int mot_stride= s->b8_stride;
          const int mot_xy= mb_x*2 + mb_y*2*mot_stride;
  
 -        assert(!s->mb_skipped);
 +        av_assert2(!s->mb_skipped);
  
-         memcpy(mv_cache[1][1], s->current_picture.f.motion_val[0][mot_xy             ], sizeof(int16_t) * 4);
-         memcpy(mv_cache[2][1], s->current_picture.f.motion_val[0][mot_xy + mot_stride], sizeof(int16_t) * 4);
-         memcpy(mv_cache[3][1], s->current_picture.f.motion_val[0][mot_xy + mot_stride], sizeof(int16_t) * 4);
+         AV_COPY32(mv_cache[1][1], cur_frame->motion_val[0][mot_xy    ]);
+         AV_COPY32(mv_cache[1][2], cur_frame->motion_val[0][mot_xy + 1]);
  
-         if (mb_y == 0 || IS_INTRA(s->current_picture.f.mb_type[xy - s->mb_stride])) {
-             memcpy(mv_cache[0][1], mv_cache[1][1], sizeof(int16_t)*4);
+         AV_COPY32(mv_cache[2][1], cur_frame->motion_val[0][mot_xy + mot_stride    ]);
+         AV_COPY32(mv_cache[2][2], cur_frame->motion_val[0][mot_xy + mot_stride + 1]);
+         AV_COPY32(mv_cache[3][1], cur_frame->motion_val[0][mot_xy + mot_stride    ]);
+         AV_COPY32(mv_cache[3][2], cur_frame->motion_val[0][mot_xy + mot_stride + 1]);
+         if (mb_y == 0 || IS_INTRA(cur_frame->mb_type[xy - s->mb_stride])) {
+             AV_COPY32(mv_cache[0][1], mv_cache[1][1]);
+             AV_COPY32(mv_cache[0][2], mv_cache[1][2]);
          }else{
-             memcpy(mv_cache[0][1], s->current_picture.f.motion_val[0][mot_xy - mot_stride], sizeof(int16_t) * 4);
+             AV_COPY32(mv_cache[0][1], cur_frame->motion_val[0][mot_xy - mot_stride    ]);
+             AV_COPY32(mv_cache[0][2], cur_frame->motion_val[0][mot_xy - mot_stride + 1]);
          }
  
-         if (mb_x == 0 || IS_INTRA(s->current_picture.f.mb_type[xy - 1])) {
+         if (mb_x == 0 || IS_INTRA(cur_frame->mb_type[xy - 1])) {
              AV_COPY32(mv_cache[1][0], mv_cache[1][1]);
              AV_COPY32(mv_cache[2][0], mv_cache[2][1]);
          }else{