Permalink
Browse files

Merge branch 'kaudio' into lsmash

  • Loading branch information...
golgol7777 committed Jul 30, 2011
2 parents bf4a774 + 4acf766 commit 691fa723cfcdc336c48ce51f61fb127baaca5ddb
Showing with 22 additions and 19 deletions.
  1. +4 −4 common/deblock.c
  2. +2 −5 common/frame.c
  3. +3 −3 common/x86/dct-a.asm
  4. +2 −2 configure
  5. +2 −2 encoder/macroblock.c
  6. +5 −3 encoder/set.c
  7. +4 −0 input/timecode.c
View
@@ -507,14 +507,14 @@ void x264_frame_deblock_row( x264_t *h, int mb_y )
M32( bs[1][4*j] ) = 0x03030303;
// deblock the first horizontal edge of the even rows, then the first horizontal edge of the odd rows
deblock_edge( h, pixy + j*stridey, 2* stridey, bs[1][4*j], qp_top, a, b, 0, deblock_v_luma_c );
deblock_edge( h, pixy + j*stridey, 2* stridey, bs[1][4*j], qp_top, a, b, 0, h->loopf.deblock_luma[1] );
if( chroma444 )
{
deblock_edge( h, pixuv + j*strideuv, 2*strideuv, bs[1][4*j], qpc_top, a, b, 0, deblock_v_luma_c );
deblock_edge( h, pixuv + uvdiff + j*strideuv, 2*strideuv, bs[1][4*j], qpc_top, a, b, 0, deblock_v_luma_c );
deblock_edge( h, pixuv + j*strideuv, 2*strideuv, bs[1][4*j], qpc_top, a, b, 0, h->loopf.deblock_luma[1] );
deblock_edge( h, pixuv + uvdiff + j*strideuv, 2*strideuv, bs[1][4*j], qpc_top, a, b, 0, h->loopf.deblock_luma[1] );
}
else
deblock_edge( h, pixuv + j*strideuv, 2*strideuv, bs[1][4*j], qpc_top, a, b, 1, deblock_v_chroma_c );
deblock_edge( h, pixuv + j*strideuv, 2*strideuv, bs[1][4*j], qpc_top, a, b, 1, h->loopf.deblock_chroma[1] );
}
}
else
View
@@ -577,12 +577,9 @@ void x264_expand_border_mbpair( x264_t *h, int mb_x, int mb_y )
int stride = h->fenc->i_stride[i];
int height = h->param.i_height >> shift;
int pady = (h->mb.i_mb_height * 16 - h->param.i_height) >> shift;
int mbsize = 16>>shift;
pixel *fenc = h->fenc->plane[i] + mbsize * mb_x;
pixel *fenc = h->fenc->plane[i] + 16*mb_x;
for( int y = height; y < height + pady; y++ )
memcpy( fenc + y*stride,
fenc + (height-1)*stride,
mbsize * sizeof(pixel) );
memcpy( fenc + y*stride, fenc + (height-1)*stride, 16*sizeof(pixel) );
}
}
View
@@ -260,7 +260,7 @@ SUB_DCT4 ssse3
%macro ADD4x4_IDCT 1
cglobal add4x4_idct_%1, 2,2,6
add r0, 4*FDEC_STRIDE
add r0, 2*FDEC_STRIDEB
.skip_prologue:
mova m1, [r1+16]
mova m3, [r1+48]
@@ -271,8 +271,8 @@ cglobal add4x4_idct_%1, 2,2,6
paddd m0, [pd_32]
IDCT4_1D d,0,1,2,3,4,5
pxor m5, m5
STORE_DIFFx2 m0, m1, m4, m5, [r0-4*FDEC_STRIDE], [r0-2*FDEC_STRIDE]
STORE_DIFFx2 m2, m3, m4, m5, [r0+0*FDEC_STRIDE], [r0+2*FDEC_STRIDE]
STORE_DIFFx2 m0, m1, m4, m5, [r0-2*FDEC_STRIDEB], [r0-1*FDEC_STRIDEB]
STORE_DIFFx2 m2, m3, m4, m5, [r0+0*FDEC_STRIDEB], [r0+1*FDEC_STRIDEB]
RET
%endmacro
View
@@ -1166,7 +1166,7 @@ fi
echo "LDFLAGSCLI = $LDFLAGSCLI" >> config.mak
echo "CLI_LIBX264 = $CLI_LIBX264" >> config.mak
./version.sh >> config.h
./version.sh >> x264_config.h
pclibs="-L$libdir -lx264 $libpthread"
@@ -1178,7 +1178,7 @@ includedir=$includedir
Name: x264
Description: H.264 (MPEG4 AVC) encoder library
Version: $(grep POINTVER < config.h | sed -e 's/.* "//; s/".*//')
Version: $(grep POINTVER < x264_config.h | sed -e 's/.* "//; s/".*//')
Libs: $pclibs
Cflags: -I$includedir
EOF
View
@@ -1135,8 +1135,8 @@ static ALWAYS_INLINE void x264_macroblock_encode_p8x8_internal( x264_t *h, int i
dctcoef dc;
pixel *p_fenc = h->mb.pic.p_fenc[1+ch] + 4*x + 4*y*FENC_STRIDE;
pixel *p_fdec = h->mb.pic.p_fdec[1+ch] + 4*x + 4*y*FDEC_STRIDE;
nz = h->zigzagf.sub_4x4ac( h->dct.luma4x4[16+i8+ch*4], p_fenc, p_fdec, &dc );
h->mb.cache.non_zero_count[x264_scan8[16+i8+ch*4]] = nz;
nz = h->zigzagf.sub_4x4ac( h->dct.luma4x4[16+i8+ch*16], p_fenc, p_fdec, &dc );
h->mb.cache.non_zero_count[x264_scan8[16+i8+ch*16]] = nz;
}
h->mb.i_cbp_chroma = 0x02;
}
View
@@ -99,10 +99,12 @@ void x264_sei_write( bs_t *s, uint8_t *payload, int payload_size, int payload_ty
void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
{
int csp = param->i_csp & X264_CSP_MASK;
sps->i_id = i_id;
sps->i_mb_width = ( param->i_width + 15 ) / 16;
sps->i_mb_height= ( param->i_height + 15 ) / 16;
sps->i_chroma_format_idc = param->i_csp >= X264_CSP_I444 ? 3 : 1;
sps->i_chroma_format_idc = csp >= X264_CSP_I444 ? 3 : 1;
sps->b_qpprime_y_zero_transform_bypass = param->rc.i_rc_method == X264_RC_CQP && param->rc.i_qp_constant == 0;
if( sps->b_qpprime_y_zero_transform_bypass || sps->i_chroma_format_idc == 3 )
@@ -203,13 +205,13 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
sps->vui.b_signal_type_present = 0;
sps->vui.i_vidformat = ( param->vui.i_vidformat >= 0 && param->vui.i_vidformat <= 5 ? param->vui.i_vidformat : 5 );
sps->vui.b_fullrange = ( param->vui.b_fullrange >= 0 && param->vui.b_fullrange <= 1 ? param->vui.b_fullrange :
( param->i_csp >= X264_CSP_BGR ? 1 : 0 ) );
( csp >= X264_CSP_BGR ? 1 : 0 ) );
sps->vui.b_color_description_present = 0;
sps->vui.i_colorprim = ( param->vui.i_colorprim >= 0 && param->vui.i_colorprim <= 8 ? param->vui.i_colorprim : 2 );
sps->vui.i_transfer = ( param->vui.i_transfer >= 0 && param->vui.i_transfer <= 10 ? param->vui.i_transfer : 2 );
sps->vui.i_colmatrix = ( param->vui.i_colmatrix >= 0 && param->vui.i_colmatrix <= 8 ? param->vui.i_colmatrix :
( param->i_csp >= X264_CSP_BGR ? 0 : 2 ) );
( csp >= X264_CSP_BGR ? 0 : 2 ) );
if( sps->vui.i_colorprim != 2 ||
sps->vui.i_transfer != 2 ||
sps->vui.i_colmatrix != 2 )
View
@@ -342,11 +342,15 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
FAIL_IF_ERROR( !h, "malloc failed\n" )
h->input = cli_input;
h->p_handle = *p_handle;
h->pts = NULL;
if( opt->timebase )
{
ret = sscanf( opt->timebase, "%"SCNu64"/%"SCNu64, &h->timebase_num, &h->timebase_den );
if( ret == 1 )
{
h->timebase_num = strtoul( opt->timebase, NULL, 10 );
h->timebase_den = 0; /* set later by auto timebase generation */
}
FAIL_IF_ERROR( h->timebase_num > UINT32_MAX || h->timebase_den > UINT32_MAX,
"timebase you specified exceeds H.264 maximum\n" )
}

0 comments on commit 691fa72

Please sign in to comment.