From 078b275514d9f1ba89b386c12aa5a02a65633e9e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 18 Jun 2017 15:45:24 +0200 Subject: [PATCH] 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 (57f77bb41a9) 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). --- Copyright | 4 ++-- DOCS/man/vo.rst | 8 -------- video/image_writer.c | 17 +++++++---------- video/image_writer.h | 14 +++++++------- video/out/vo_image.c | 14 +++++++------- 5 files changed, 23 insertions(+), 34 deletions(-) diff --git a/Copyright b/Copyright index dca698265a..d92f323a82 100644 --- a/Copyright +++ b/Copyright @@ -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 diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index a282541519..20e8e0baf7 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -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=`` - Specify standard or progressive JPEG (default: no). - ``--vo-image-jpeg-baseline=`` - 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=`` Specify the directory to save the image files to (default: ``./``). diff --git a/video/image_writer.c b/video/image_writer.c index 9855839262..ec5f578e2b 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -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 . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #include @@ -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; diff --git a/video/image_writer.h b/video/image_writer.h index 723dffc3ef..7f7f123499 100644 --- a/video/image_writer.h +++ b/video/image_writer.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 . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #include "options/m_option.h" diff --git a/video/out/vo_image.c b/video/out/vo_image.c index fd3efde253..9d30d5b6d2 100644 --- a/video/out/vo_image.c +++ b/video/out/vo_image.c @@ -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 . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #include