switch( external_csp & X264_CSP_MASK )
{
case X264_CSP_NV12:
+ case X264_CSP_NV21:
case X264_CSP_I420:
case X264_CSP_YV12:
return X264_CSP_NV12;
return -1;
}
- dst->i_type = src->i_type;
+ if( src->i_type < X264_TYPE_AUTO || src->i_type > X264_TYPE_KEYFRAME )
+ {
+ x264_log( h, X264_LOG_WARNING, "forced frame type (%d) at %d is unknown\n", src->i_type, h->frames.i_input );
+ dst->i_forced_type = X264_TYPE_AUTO;
+ }
+ else
+ dst->i_forced_type = src->i_type;
+
+ dst->i_type = dst->i_forced_type;
dst->i_qpplus1 = src->i_qpplus1;
dst->i_pts = dst->i_reordered_pts = src->i_pts;
dst->param = src->param;
h->mc.plane_copy( dst->plane[1], dst->i_stride[1], (pixel*)pix[1],
stride[1]/sizeof(pixel), h->param.i_width, h->param.i_height>>v_shift );
}
+ else if( i_csp == X264_CSP_NV21 )
+ {
+ get_plane_ptr( h, src, &pix[1], &stride[1], 1, 0, v_shift );
+ h->mc.plane_copy_swap( dst->plane[1], dst->i_stride[1], (pixel*)pix[1],
+ stride[1]/sizeof(pixel), h->param.i_width>>1, h->param.i_height>>v_shift );
+ }
else if( i_csp == X264_CSP_I420 || i_csp == X264_CSP_I422 || i_csp == X264_CSP_YV12 || i_csp == X264_CSP_YV16 )
{
int uv_swap = i_csp == X264_CSP_YV12 || i_csp == X264_CSP_YV16;