Skip to content

Commit

Permalink
Push version, fix readme, reduce default quality to 99.
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicibo committed May 22, 2024
1 parent 4940225 commit 1574b14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ Below are parameters to tune libimagequant (LIQ). Those shall only be used along
| ``--liq-speed`` | LIQ speed. Lower value are slower but higher quality. |
| | Choices: value within [1; 10] incl. Default: ``4`` |
+--------------------+--------------------------------------------------------+
| ``--liq-quality`` | Quantization quality. Values < 100 can be visually |
| | lossless and will compress way better as PGS. |
| | Default: ``100`` but 90~97 is recommended in general. |
| ``--liq-quality`` | Quantization quality. 100 is best, < 100 is generally |
| | visually lossless and will compress way better as PGS. |
| | Default: ``99`` but 85~100 is recommended in general. |
+--------------------+--------------------------------------------------------+
| ``--liq-dither`` | Dithering level, value must be within [0; 1.0] incl. |
| | Default: ``1.0``. Disable: ``0``. LIQ dithering is soft|
Expand Down Expand Up @@ -155,8 +155,9 @@ Moreover, the last table has debugging parameters. These should not have any pra

Basic Scenarist BD example
--------------------------
::

:: ass2bdnxml -f 29.97 -v 1080i -s 2 -q 255 -r --liq-quality 98 subtitle.ass
ass2bdnxml -f 29.97 -v 1080i -s 2 -q 255 -r --liq-quality 98 subtitle.ass

- 1080i29.97 (``-v 1080i -f 29.97``)
- quantize with a maximum of 255 colours (``-q 255``)
Expand Down
8 changes: 4 additions & 4 deletions ass2bdnxml.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "common.h"

#define A2B_VERSION_STRING "0.7c"
#define A2B_VERSION_STRING "0.7e"

frate_t frates[] = {
{"23.976",24, 24000, 1001},
Expand Down Expand Up @@ -242,7 +242,7 @@ int main(int argc, char *argv[])
memset(offset_vals, 0, sizeof(offset_vals));

opts_t args;
liqopts_t liqargs = {.dither=1.0f, .speed=4, .max_quality=100};
liqopts_t liqargs = {.dither=1.0f, .speed=4, .max_quality=99};

memset(&args, 0, sizeof(args));

Expand Down Expand Up @@ -314,9 +314,9 @@ int main(int argc, char *argv[])
printf("Dimming coefficient not a valid percentage.\n");
exit(1);
} else {
args.dim_flag = 1;
args.dim_flag = args.dimf > 0.0;
args.dimf = MAX(0.0f, MIN(1.0f, 1.0f - (args.dimf/100.0f)));
}
args.dimf = MAX(0.0f, MIN(1.0f, 1.0f - (args.dimf/100.0f)));
break;
case OPT_ARG_DVD_MODE:
args.dvd_mode = 1;
Expand Down
2 changes: 1 addition & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ typedef struct opts_s {
uint32_t fullscreen : 1;
uint32_t square_px : 1;
uint32_t downsampled : 4;
uint32_t dim_flag : 1;
uint32_t dim_flag : 1; //8
uint32_t _bpad1 : 16;
const char *fontdir;
} opts_t;
Expand Down

0 comments on commit 1574b14

Please sign in to comment.