Merge git://git.videolan.org/x264
authorKieran Kunhya <kieran@kunhya.com>
Fri, 24 Jan 2014 12:24:58 +0000 (12:24 +0000)
committerKieran Kunhya <kieran@kunhya.com>
Fri, 24 Jan 2014 12:24:58 +0000 (12:24 +0000)
40 files changed:
1  2 
common/arm/quant-a.S
common/arm/quant.h
common/bitstream.c
common/bitstream.h
common/cabac.c
common/common.c
common/common.h
common/dct.c
common/dct.h
common/frame.c
common/frame.h
common/macroblock.c
common/macroblock.h
common/mc.c
common/mc.h
common/mvpred.c
common/pixel.c
common/predict.c
common/predict.h
common/quant.c
common/quant.h
common/set.c
common/set.h
common/x86/predict-a.asm
common/x86/predict.h
common/x86/quant-a.asm
encoder/analyse.c
encoder/encoder.c
encoder/macroblock.c
encoder/macroblock.h
encoder/me.c
encoder/ratecontrol.c
encoder/rdo.c
encoder/set.c
encoder/set.h
encoder/slicetype.c
output/matroska.c
tools/checkasm.c
x264.c
x264.h

Simple merge
Simple merge
Simple merge
Simple merge
diff --cc common/cabac.c
Simple merge
diff --cc common/common.c
Simple merge
diff --cc common/common.h
@@@ -112,12 -109,8 +112,12 @@@ do {
  
  #define NALU_OVERHEAD 5 // startcode + NAL type costs 5 bytes per frame
  #define FILLER_OVERHEAD (NALU_OVERHEAD+1)
- #define SEI_OVERHEAD (NALU_OVERHEAD - (h->param.b_annexb && !h->param.b_avcintra_compat && (h->out.i_nal-1)))
+ #define SEI_OVERHEAD (NALU_OVERHEAD - (h->param.b_annexb && !h->param.i_avcintra_class && (h->out.i_nal-1)))
  
 +#define STRUCTURE_OVERHEAD 4 // startcode
 +
 +#define LOG2_16(x) (31 - x264_clz((x)|1))
 +
  /****************************************************************************
   * Includes
   ****************************************************************************/
diff --cc common/dct.c
Simple merge
diff --cc common/dct.h
Simple merge
diff --cc common/frame.c
@@@ -390,12 -397,18 +397,21 @@@ int x264_frame_copy_picture( x264_t *h
      dst->mb_info    = h->param.analyse.b_mb_info ? src->prop.mb_info : NULL;
      dst->mb_info_free = h->param.analyse.b_mb_info ? src->prop.mb_info_free : NULL;
  
 +    dst->b_tff            = src->b_tff;
 +    dst->b_rff            = src->b_rff;
 +
      uint8_t *pix[3];
      int stride[3];
-     if ( i_csp >= X264_CSP_BGR )
+     if( i_csp == X264_CSP_V210 )
+     {
+          stride[0] = src->img.i_stride[0];
+          pix[0] = src->img.plane[0];
+          h->mc.plane_copy_deinterleave_v210( dst->plane[0], dst->i_stride[0],
+                                              dst->plane[1], dst->i_stride[1],
+                                              (uint32_t *)pix[0], stride[0]/sizeof(uint32_t), h->param.i_width, h->param.i_height );
+     }
+     else if( i_csp >= X264_CSP_BGR )
      {
           stride[0] = src->img.i_stride[0];
           pix[0] = src->img.plane[0];
diff --cc common/frame.h
Simple merge
Simple merge
Simple merge
diff --cc common/mc.c
Simple merge
diff --cc common/mc.h
Simple merge
diff --cc common/mvpred.c
Simple merge
diff --cc common/pixel.c
Simple merge
Simple merge
Simple merge
diff --cc common/quant.c
Simple merge
diff --cc common/quant.h
Simple merge
diff --cc common/set.c
Simple merge
diff --cc common/set.h
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -917,25 -810,9 +917,25 @@@ static void x264_mb_analyse_intra( x264
      int idx;
      int lambda = a->i_lambda;
  
 +    if( MPEG2 )
 +    {
 +        int i_satd = 0;
 +        for( int i = 0; i < 4; i++ )
 +        {
 +            p_src = &h->mb.pic.p_fenc[0][8 * (i&1) + 8 * (i>>1) * FENC_STRIDE];
 +            p_dst = &h->mb.pic.p_fdec[0][8 * (i&1) + 8 * (i>>1) * FDEC_STRIDE];
 +            h->predict_8x8_mpeg2( p_dst, 0 );
 +            i_satd += h->pixf.mbcmp[PIXEL_8x8]( p_dst, FDEC_STRIDE, p_src, FENC_STRIDE );
 +        }
 +
 +        int quant = h->mb.i_last_qp != a->i_qp && h->mb.i_mb_x;
 +        a->i_satd_i16x16 = i_satd + lambda * x264_i_mb_type[h->sh.i_type][quant].i_size;
 +        return;
 +    }
 +
      /*---------------- Try all mode and calculate their score ---------------*/
      /* Disabled i16x16 for AVC-Intra compat */
-     if( !h->param.b_avcintra_compat )
+     if( !h->param.i_avcintra_class )
      {
          const int8_t *predict_mode = predict_16x16_mode_available( h->mb.i_neighbour_intra );
  
@@@ -3867,10 -3509,10 +3884,10 @@@ int     x264_encoder_encode( x264_t *h
          h->fenc->extra_sei.sei_free = NULL;
      }
  
 -    if( h->fenc->b_keyframe )
 +    if( h->fenc->b_keyframe && !MPEG2 )
      {
          /* Avid's decoder strictly wants two SEIs for AVC-Intra so we can't insert the x264 SEI */
-         if( h->param.b_repeat_headers && h->fenc->i_frame == 0 && !h->param.b_avcintra_compat )
+         if( h->param.b_repeat_headers && h->fenc->i_frame == 0 && !h->param.i_avcintra_class )
          {
              /* identify ourself */
              x264_nal_start( h, NAL_SEI, NAL_PRIORITY_DISPOSABLE );
Simple merge
Simple merge
diff --cc encoder/me.c
Simple merge
Simple merge
diff --cc encoder/rdo.c
Simple merge
diff --cc encoder/set.c
@@@ -634,11 -576,11 +634,11 @@@ int x264_sei_version_write( x264_t *h, 
  
      memcpy( payload, uuid, 16 );
      sprintf( payload+16, "x264 - core %d%s - H.264/MPEG-4 AVC codec - "
-              "Copy%s 2003-2013 - http://www.videolan.org/x264.html - options: %s",
+              "Copy%s 2003-2014 - http://www.videolan.org/x264.html - options: %s",
               X264_BUILD, X264_VERSION, HAVE_GPL?"left":"right", opts );
      length = strlen(payload)+1;
 -
 -    x264_sei_write( s, (uint8_t *)payload, length, SEI_USER_DATA_UNREGISTERED );
 +    MPEG2 ? x264_user_data_write_mpeg2( s, (uint8_t *)payload, length ) :
 +            x264_sei_write( s, (uint8_t *)payload, length, SEI_USER_DATA_UNREGISTERED );
  
      x264_free( opts );
      x264_free( payload );
diff --cc encoder/set.h
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc x264.c
Simple merge
diff --cc x264.h
Simple merge