static int vf_open(vf_instance_t *vf) { if (vf->priv->out_fmt == STEREO_AUTO) { MP_FATAL(vf, "No autodetection for stereo output.\n"); return 0; } if (vf->priv->in_fmt == STEREO_AUTO) vf->priv->auto_in = 1; lavfi_init(vf); return 1; } #define OPT_BASE_STRUCT struct vf_priv_s static const m_option_t vf_opts_fields[] = { OPT_CHOICE_C("in", in_fmt, 0, stereo_code_names), OPT_CHOICE_C("out", out_fmt, 0, stereo_code_names), OPT_SUBSTRUCT("", lw_opts, vf_lw_conf, 0), {0} }; const vf_info_t vf_info_stereo3d = { .description = "stereoscopic 3d view", .name = "stereo3d", .open = vf_open, .priv_size = sizeof(struct vf_priv_s), .priv_defaults = &vf_priv_default, .options = vf_opts_fields, };
return mpi; } static int vf_open(vf_instance_t *vf) { vf->query_format = query_format; vf->reconfig = reconfig; vf->filter = filter; return 1; } #define OPT_BASE_STRUCT struct vf_priv_s static const m_option_t vf_opts_fields[] = { OPT_IMAGEFORMAT("fmt", fmt, 0), OPT_IMAGEFORMAT("outfmt", outfmt, 0), OPT_CHOICE_C("colormatrix", colormatrix, 0, mp_csp_names), OPT_CHOICE_C("colorlevels", colorlevels, 0, mp_csp_levels_names), OPT_CHOICE_C("primaries", primaries, 0, mp_csp_prim_names), OPT_CHOICE_C("gamma", gamma, 0, mp_csp_trc_names), OPT_CHOICE_C("chroma-location", chroma_location, 0, mp_chroma_names), OPT_CHOICE_C("stereo-in", stereo_in, 0, mp_stereo3d_names), OPT_CHOICE_C("stereo-out", stereo_out, 0, mp_stereo3d_names), OPT_INTRANGE("rotate", rotate, 0, -1, 359), OPT_INT("dw", dw, 0), OPT_INT("dh", dh, 0), OPT_DOUBLE("dar", dar, 0), OPT_REMOVED("outputlevels", "use the --video-output-levels global option"), {0} }; const vf_info_t vf_info_format = {
.jpeg_smooth = 0, .jpeg_source_chroma = 1, .tag_csp = 0, }; const struct m_opt_choice_alternatives mp_image_writer_formats[] = { {"jpg", AV_CODEC_ID_MJPEG}, {"jpeg", AV_CODEC_ID_MJPEG}, {"png", AV_CODEC_ID_PNG}, {0} }; #define OPT_BASE_STRUCT struct image_writer_opts const struct m_option image_writer_opts[] = { OPT_CHOICE_C("format", format, 0, mp_image_writer_formats), OPT_INTRANGE("jpeg-quality", jpeg_quality, 0, 0, 100), OPT_INTRANGE("jpeg-smooth", jpeg_smooth, 0, 0, 100), OPT_FLAG("jpeg-source-chroma", jpeg_source_chroma, 0), OPT_INTRANGE("png-compression", png_compression, 0, 0, 9), OPT_INTRANGE("png-filter", png_filter, 0, 0, 5), OPT_FLAG("high-bit-depth", high_bit_depth, 0), OPT_FLAG("tag-colorspace", tag_csp, 0), {0}, }; struct image_writer_ctx { struct mp_log *log; const struct image_writer_opts *opts; struct mp_imgfmt_desc original_format; };