summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShreesh Adiga <16567adigashreesh@gmail.com>2020-11-27 15:40:42 +0530
committeravih <avih@users.noreply.github.com>2020-11-27 15:31:24 +0200
commit24525e4ef9ba27ab770fddfb2055f0d0dc8b3bea (patch)
tree8d5cd8acdc7ff45c592d5321cf96671df31fa638
parent8886f017a150743a8113ee53220889c54400ece6 (diff)
downloadmpv-24525e4ef9ba27ab770fddfb2055f0d0dc8b3bea.tar.bz2
mpv-24525e4ef9ba27ab770fddfb2055f0d0dc8b3bea.tar.xz
vo_sixel: Update libsixel constant values
In sixel_dither_initialize, replace 3 with the libsixel SIXEL_PIXELFORMAT_RGB888. Also in sixel_encode, the 4th parameter is supposed to be depth, which also happens to be the value of PIXELFORMAT_RGB888, so replacing that constant with the depth value.
-rw-r--r--video/out/vo_sixel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/vo_sixel.c b/video/out/vo_sixel.c
index df0c05e139..3365daa48a 100644
--- a/video/out/vo_sixel.c
+++ b/video/out/vo_sixel.c
@@ -160,7 +160,8 @@ static SIXELSTATUS prepare_dynamic_palette(struct vo *vo)
/* create histgram and construct color palette
* with median cut algorithm. */
status = sixel_dither_initialize(priv->testdither, priv->buffer,
- priv->width, priv->height, 3,
+ priv->width, priv->height,
+ SIXEL_PIXELFORMAT_RGB888,
LARGE_NORM, REP_CENTER_BOX,
QUALITY_LOW);
if (SIXEL_FAILED(status))
@@ -369,8 +370,7 @@ static void flip_page(struct vo *vo)
// Go to the offset row and column, then display the image
printf(ESC_GOTOXY, priv->top, priv->left);
sixel_encode(priv->buffer, priv->width, priv->height,
- PIXELFORMAT_RGB888,
- priv->dither, priv->output);
+ depth, priv->dither, priv->output);
fflush(stdout);
}