Merge remote-tracking branch 'x264/master'
authorPhillip Blucas <pblucas@gmail.com>
Sat, 22 Oct 2011 01:49:23 +0000 (20:49 -0500)
committerPhillip Blucas <pblucas@gmail.com>
Sat, 22 Oct 2011 01:49:23 +0000 (20:49 -0500)
Conflicts:
common/common.h
configure

22 files changed:
1  2 
common/bitstream.h
common/common.c
common/common.h
common/dct.c
common/frame.c
common/mc.c
common/mc.h
common/predict.c
common/quant.c
common/set.c
configure
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/slicetype.c
x264.c
x264.h

index 869943a,1a15338..0227b75
mode 100755,100644..100755
diff --cc common/common.c
Simple merge
diff --cc common/common.h
@@@ -111,13 -102,17 +108,24 @@@ do {
  #   define PARAM_INTERLACED 0
  #endif
  
 +/* MPEG-2 Support */
 +#if HAVE_MPEG2
 +#   define MPEG2 h->param.b_mpeg2
 +#else
 +#   define MPEG2 0
 +#endif
 +
+ #ifdef CHROMA_FORMAT
+ #    define CHROMA_H_SHIFT (CHROMA_FORMAT == CHROMA_420 || CHROMA_FORMAT == CHROMA_422)
+ #    define CHROMA_V_SHIFT (CHROMA_FORMAT == CHROMA_420)
+ #else
+ #    define CHROMA_FORMAT h->sps->i_chroma_format_idc
+ #    define CHROMA_H_SHIFT h->mb.chroma_h_shift
+ #    define CHROMA_V_SHIFT h->mb.chroma_v_shift
+ #endif
+ #define CHROMA_SIZE(s) ((s)>>(CHROMA_H_SHIFT+CHROMA_V_SHIFT))
+ #define FRAME_SIZE(s) ((s)+2*CHROMA_SIZE(s))
  #define CHROMA444 (CHROMA_FORMAT == CHROMA_444)
  
  /* Unions for type-punning.
diff --cc common/dct.c
index 36b294e,e62ec06..1987d25
mode 100755,100644..100755
diff --cc common/frame.c
Simple merge
diff --cc common/mc.c
Simple merge
diff --cc common/mc.h
Simple merge
Simple merge
diff --cc common/quant.c
Simple merge
diff --cc common/set.c
Simple merge
diff --cc configure
index b8e3bf0,de6afd9..2df44c1
mode 100644,100755..100644
+++ b/configure
@@@ -28,9 -28,9 +28,10 @@@ Configuration options
    --disable-thread         disable multithreaded encoding
    --enable-win32thread     use win32threads (windows only)
    --disable-interlaced     disable interlaced encoding support
 +  --disable-mpeg2          disables MPEG-2 encoding support
    --enable-visualize       enable visualization (X11 only)
    --bit-depth=BIT_DEPTH    set output bit depth (8-10) [8]
+   --chroma-format=FORMAT   output chroma format (420, 422, 444, all) [all]
  
  Advanced options:
    --disable-asm            disable platform-specific assembly optimizations
@@@ -972,11 -985,13 +994,14 @@@ rm -f conftest
  
  # generate exported config file
  
+ config_chroma_format="X264_CSP_I$chroma_format"
+ [ "$config_chroma_format" == "X264_CSP_Iall" ] && config_chroma_format="0"
  cat > x264_config.h << EOF
- #define X264_BIT_DEPTH  $bit_depth
- #define X264_GPL        $x264_gpl
- #define X264_INTERLACED $x264_interlaced
- #define X264_MPEG2      $x264_mpeg2
+ #define X264_BIT_DEPTH     $bit_depth
+ #define X264_GPL           $x264_gpl
+ #define X264_INTERLACED    $x264_interlaced
++#define X264_MPEG2         $x264_mpeg2
+ #define X264_CHROMA_FORMAT $config_chroma_format
  EOF
  
  # generate config files
@@@ -1095,28 -1110,28 +1120,29 @@@ gpl_filters="
  [ $gpl = yes ] && filters="$filters $gpl_filters"
  
  cat > conftest.log <<EOF
- Platform:   $ARCH
- System:     $SYS
- cli:        $cli
- libx264:    $cli_libx264
- shared:     $shared
- static:     $static
- asm:        $asm
- interlaced: $interlaced
- mpeg2:      $mpeg2
- avs:        $avs
- lavf:       $lavf
- ffms:       $ffms
- gpac:       $gpac
- gpl:        $gpl
- thread:     $thread
- filters:    $filters
- debug:      $debug
- gprof:      $gprof
- strip:      $strip
- PIC:        $pic
- visualize:  $vis
- bit depth:  $bit_depth
+ platform:      $ARCH
+ system:        $SYS
+ cli:           $cli
+ libx264:       $cli_libx264
+ shared:        $shared
+ static:        $static
+ asm:           $asm
+ interlaced:    $interlaced
++mpeg2:         $mpeg2
+ avs:           $avs
+ lavf:          $lavf
+ ffms:          $ffms
+ gpac:          $gpac
+ gpl:           $gpl
+ thread:        $thread
+ filters:       $filters
+ debug:         $debug
+ gprof:         $gprof
+ strip:         $strip
+ PIC:           $pic
+ visualize:     $vis
+ bit depth:     $bit_depth
+ chroma format: $chroma_format
  EOF
  
  echo >> config.log
Simple merge
Simple merge
Simple merge
index 4a7183c,f8c2149..5d905bf
mode 100755,100644..100755
@@@ -57,12 -50,8 +57,10 @@@ void x264_macroblock_encode      ( x264
  void x264_macroblock_write_cabac ( x264_t *h, x264_cabac_t *cb );
  void x264_macroblock_write_cavlc ( x264_t *h );
  
 +void x262_macroblock_write_vlc ( x264_t *h );
 +
  void x264_macroblock_encode_p8x8( x264_t *h, int i8 );
  void x264_macroblock_encode_p4x4( x264_t *h, int i4 );
- void x264_mb_encode_i4x4( x264_t *h, int p, int idx, int i_qp, int i_mode );
- void x264_mb_encode_i8x8( x264_t *h, int p, int idx, int i_qp, int i_mode, pixel *edge );
  void x264_mb_encode_chroma( x264_t *h, int b_inter, int i_qp );
  
  void x264_cabac_mb_skip( x264_t *h, int b_skip );
diff --cc encoder/me.c
Simple merge
Simple merge
diff --cc encoder/rdo.c
index 6655b18,f02c50b..9b97dbd
mode 100755,100644..100755
diff --cc encoder/set.c
Simple merge
Simple merge
diff --cc x264.c
index 720fe13,d735ab4..c0cdd2f
mode 100755,100644..100755
--- 1/x264.c
--- 2/x264.c
+++ b/x264.c
diff --cc x264.h
Simple merge