From 24525e4ef9ba27ab770fddfb2055f0d0dc8b3bea Mon Sep 17 00:00:00 2001 From: Shreesh Adiga <16567adigashreesh@gmail.com> Date: Fri, 27 Nov 2020 15:40:42 +0530 Subject: 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. --- video/out/vo_sixel.c | 6 +++--- 1 file 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); } -- cgit v1.2.3