mirror of https://github.com/mpv-player/mpv
image_writer, vo_image: change license to LGPL
image_writer.c has code originating from vf_screenshot.c, vo_jpeg.c, and
potentially others. vo_image.c is based on a bunch of those VOs as well,
and the intention was to replace them with a single codebase.
vo_tga.c was written by someone who was not or not could be contacted,
but it doesn't matter anyway, as no code from that initial patch was
used.
One rather old patch (57f77bb41a
) reordered by libjpeg patch API calls,
and the author of the patch was not contacted. But at least with the
smoothing_factor override removed, this pretty much exactly corresponds
to the official libjpeg API example (and might even reflect a change to
those - didn't dig deeper). This removes the -jpeg-smooth option. While
we're at it, remove all the other dropped jpeg options from the manpage
(which was forgotten in past changes).
This commit is contained in:
parent
5ea851feae
commit
078b275514
|
@ -303,7 +303,7 @@ x video/decode/dec_video.* hard
|
|||
video/fmt-conversion.* LGPL
|
||||
video/gpu_memcpy.* will be deleted
|
||||
video/hwdec.* LGPL
|
||||
x video/image_writer.* unknown
|
||||
video/image_writer.* LGPL
|
||||
video/img_format.* LGPL
|
||||
video/mp_image.* almost LGPL
|
||||
video/mp_image_pool.* LGPL
|
||||
|
@ -323,7 +323,7 @@ x video/image_writer.* unknown
|
|||
video/out/vo_caca.c unknown
|
||||
video/out/vo_direct3d.c unknown
|
||||
video/out/vo_drm.c LGPL
|
||||
video/out/vo_image.c unknown
|
||||
video/out/vo_image.c LGPL
|
||||
video/out/vo_lavc.c LGPL
|
||||
video/out/vo_null.c LGPL
|
||||
video/out/vo_opengl.c LGPL
|
||||
|
|
|
@ -426,16 +426,8 @@ Available video output drivers are:
|
|||
3 = average; 4 = Paeth; 5 = mixed) (default: 5)
|
||||
``--vo-image-jpeg-quality=<0-100>``
|
||||
JPEG quality factor (default: 90)
|
||||
``--vo-image-jpeg-progressive=<yes|no>``
|
||||
Specify standard or progressive JPEG (default: no).
|
||||
``--vo-image-jpeg-baseline=<yes|no>``
|
||||
Specify use of JPEG baseline or not (default: yes).
|
||||
``--vo-image-jpeg-optimize=<0-100>``
|
||||
JPEG optimization factor (default: 100)
|
||||
``--vo-image-jpeg-smooth=<0-100>``
|
||||
smooth factor (default: 0)
|
||||
``--vo-image-jpeg-dpi=<1->``
|
||||
JPEG DPI (default: 72)
|
||||
``--vo-image-outdir=<dirname>``
|
||||
Specify the directory to save the image files to (default: ``./``).
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
* This file is part of mpv.
|
||||
*
|
||||
* mpv is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* mpv is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* mpv is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -47,7 +47,6 @@ const struct image_writer_opts image_writer_opts_defaults = {
|
|||
.png_compression = 7,
|
||||
.png_filter = 5,
|
||||
.jpeg_quality = 90,
|
||||
.jpeg_smooth = 0,
|
||||
.jpeg_source_chroma = 1,
|
||||
.tag_csp = 0,
|
||||
};
|
||||
|
@ -64,7 +63,6 @@ const struct m_opt_choice_alternatives mp_image_writer_formats[] = {
|
|||
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),
|
||||
|
@ -210,7 +208,6 @@ static bool write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
|
|||
|
||||
jpeg_set_defaults(&cinfo);
|
||||
jpeg_set_quality(&cinfo, ctx->opts->jpeg_quality, 0);
|
||||
cinfo.smoothing_factor = ctx->opts->jpeg_smooth;
|
||||
|
||||
if (ctx->opts->jpeg_source_chroma) {
|
||||
cinfo.comp_info[0].h_samp_factor = 1 << ctx->original_format.chroma_xs;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
* This file is part of mpv.
|
||||
*
|
||||
* mpv is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* mpv is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* mpv is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "options/m_option.h"
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
* This file is part of mpv.
|
||||
*
|
||||
* mpv is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* mpv is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* mpv is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
Loading…
Reference in New Issue