summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-02 01:10:18 +0200
committerwm4 <wm4@nowhere>2015-08-02 01:10:18 +0200
commitaa0157d9b8fc06de730a3572d7096a4d0de9ae3c (patch)
tree62660d1fb1fadc5dca4522ba96a0c7716efe67b2
parent920cf8971e578cfcf8838e454d15bdd2c12ab724 (diff)
downloadmpv-aa0157d9b8fc06de730a3572d7096a4d0de9ae3c.tar.bz2
mpv-aa0157d9b8fc06de730a3572d7096a4d0de9ae3c.tar.xz
image_writer: don't use jpeg baseline, and remove useless jpeg options
The jpeg-optimize and jpeg-baseline options were undocumented, and they're also pretty useless. There's no reason to ever change them. Also, don't write jpeg baseline images. This just makes compression worse for the sake of rather questionable compatibility with ancient decoders.
-rw-r--r--video/image_writer.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/video/image_writer.c b/video/image_writer.c
index 9598098f0f..089afad228 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -46,9 +46,7 @@ const struct image_writer_opts image_writer_opts_defaults = {
.png_compression = 7,
.png_filter = 5,
.jpeg_quality = 90,
- .jpeg_optimize = 100,
.jpeg_smooth = 0,
- .jpeg_baseline = 1,
.jpeg_source_chroma = 1,
.tag_csp = 0,
};
@@ -58,9 +56,7 @@ const struct image_writer_opts image_writer_opts_defaults = {
const struct m_sub_options image_writer_conf = {
.opts = (const m_option_t[]) {
OPT_INTRANGE("jpeg-quality", jpeg_quality, 0, 0, 100),
- OPT_INTRANGE("jpeg-optimize", jpeg_optimize, 0, 0, 100),
OPT_INTRANGE("jpeg-smooth", jpeg_smooth, 0, 0, 100),
- OPT_FLAG("jpeg-baseline", jpeg_baseline, 0),
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),
@@ -193,8 +189,7 @@ static bool write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
cinfo.JFIF_minor_version = 2;
jpeg_set_defaults(&cinfo);
- jpeg_set_quality(&cinfo, ctx->opts->jpeg_quality, ctx->opts->jpeg_baseline);
- cinfo.optimize_coding = ctx->opts->jpeg_optimize;
+ jpeg_set_quality(&cinfo, ctx->opts->jpeg_quality, 0);
cinfo.smoothing_factor = ctx->opts->jpeg_smooth;
if (ctx->opts->jpeg_source_chroma) {