x264_picture_init( &x4->pic );
281281 x4->pic.img.i_csp = x4->params.i_csp;
282#if X264_BUILD >= 153
283 if (x4->params.i_bitdepth > 8)
284#else
282285 if (x264_bit_depth > 8)
286#endif
283287 x4->pic.img.i_csp |= X264_CSP_HIGH_DEPTH;
284288 x4->pic.img.i_plane = avfmt2_num_planes(ctx->pix_fmt);
491495 x4->params.i_log_level = X264_LOG_DEBUG;
492496 x4->params.i_csp = convert_pix_fmt(avctx->pix_fmt);
497#if X264_BUILD >= 153
498 x4->params.i_bitdepth = av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth;
499#endif
493500
494501 PARSE_X264_OPT("weightp", wpredp);
879886 AV_PIX_FMT_NONE
880887};
888static const enum AVPixelFormat pix_fmts_all[] = {
889 AV_PIX_FMT_YUV420P,
890 AV_PIX_FMT_YUVJ420P,
891 AV_PIX_FMT_YUV422P,
892 AV_PIX_FMT_YUVJ422P,
893 AV_PIX_FMT_YUV444P,
894 AV_PIX_FMT_YUVJ444P,
895 AV_PIX_FMT_NV12,
896 AV_PIX_FMT_NV16,
897#ifdef X264_CSP_NV21
898 AV_PIX_FMT_NV21,
899#endif
900 AV_PIX_FMT_YUV420P10,
901 AV_PIX_FMT_YUV422P10,
902 AV_PIX_FMT_YUV444P10,
903 AV_PIX_FMT_NV20,
904 AV_PIX_FMT_NONE
905};
881906#if CONFIG_LIBX264RGB_ENCODER
882907static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {
890915static av_cold void X264_init_static(AVCodec *codec)
891916{
917#if X264_BUILD < 153
892918 if (x264_bit_depth == 8)
893919 codec->pix_fmts = pix_fmts_8bit;
896922 else if (x264_bit_depth == 10)
897923 codec->pix_fmts = pix_fmts_10bit;
924#else
925 codec->pix_fmts = pix_fmts_all;
926#endif
898927}
899928
网友评论