mirror of
https://github.com/simon987/sist2.git
synced 2025-12-10 22:18:54 +00:00
Update --thumbnail-quality argument, add documentation
This commit is contained in:
2
third-party/libscan/libscan/comic/comic.h
vendored
2
third-party/libscan/libscan/comic/comic.h
vendored
@@ -11,7 +11,7 @@ typedef struct {
|
||||
|
||||
int enable_tn;
|
||||
int tn_size;
|
||||
float tn_qscale;
|
||||
int tn_qscale;
|
||||
|
||||
unsigned int cbr_mime;
|
||||
unsigned int cbz_mime;
|
||||
|
||||
2
third-party/libscan/libscan/ebook/ebook.h
vendored
2
third-party/libscan/libscan/ebook/ebook.h
vendored
@@ -15,7 +15,7 @@ typedef struct {
|
||||
logf_callback_t logf;
|
||||
store_callback_t store;
|
||||
int fast_epub_parse;
|
||||
float tn_qscale;
|
||||
int tn_qscale;
|
||||
} scan_ebook_ctx_t;
|
||||
|
||||
void parse_ebook(scan_ebook_ctx_t *ctx, vfile_t *f, const char *mime_str, document_t *doc);
|
||||
|
||||
8
third-party/libscan/libscan/media/media.h
vendored
8
third-party/libscan/libscan/media/media.h
vendored
@@ -16,7 +16,7 @@ typedef struct {
|
||||
store_callback_t store;
|
||||
|
||||
int tn_size;
|
||||
float tn_qscale;
|
||||
int tn_qscale;
|
||||
/** Number of thumbnails to generate for videos */
|
||||
int tn_count;
|
||||
|
||||
@@ -28,7 +28,7 @@ typedef struct {
|
||||
} scan_media_ctx_t;
|
||||
|
||||
__always_inline
|
||||
static AVCodecContext *alloc_jpeg_encoder(int w, int h, float qscale) {
|
||||
static AVCodecContext *alloc_jpeg_encoder(int w, int h, int qscale) {
|
||||
|
||||
const AVCodec *jpeg_codec = avcodec_find_encoder(AV_CODEC_ID_MJPEG);
|
||||
AVCodecContext *jpeg = avcodec_alloc_context3(jpeg_codec);
|
||||
@@ -36,7 +36,7 @@ static AVCodecContext *alloc_jpeg_encoder(int w, int h, float qscale) {
|
||||
jpeg->height = h;
|
||||
jpeg->time_base.den = 1000000;
|
||||
jpeg->time_base.num = 1;
|
||||
jpeg->i_quant_factor = qscale;
|
||||
jpeg->i_quant_factor = (float) qscale;
|
||||
|
||||
jpeg->pix_fmt = AV_PIX_FMT_YUVJ420P;
|
||||
int ret = avcodec_open2(jpeg, jpeg_codec, NULL);
|
||||
@@ -49,7 +49,7 @@ static AVCodecContext *alloc_jpeg_encoder(int w, int h, float qscale) {
|
||||
}
|
||||
|
||||
|
||||
void parse_media(scan_media_ctx_t *ctx, vfile_t *f, document_t *doc, const char*mime_str);
|
||||
void parse_media(scan_media_ctx_t *ctx, vfile_t *f, document_t *doc, const char *mime_str);
|
||||
|
||||
void init_media();
|
||||
|
||||
|
||||
2
third-party/libscan/libscan/raw/raw.h
vendored
2
third-party/libscan/libscan/raw/raw.h
vendored
@@ -10,7 +10,7 @@ typedef struct {
|
||||
|
||||
int enable_tn;
|
||||
int tn_size;
|
||||
float tn_qscale;
|
||||
int tn_qscale;
|
||||
} scan_raw_ctx_t;
|
||||
|
||||
void parse_raw(scan_raw_ctx_t *ctx, vfile_t *f, document_t *doc);
|
||||
|
||||
8
third-party/libscan/test/main.cpp
vendored
8
third-party/libscan/test/main.cpp
vendored
@@ -1133,7 +1133,7 @@ int main(int argc, char **argv) {
|
||||
ebook_ctx.log = noop_log;
|
||||
ebook_ctx.logf = noop_logf;
|
||||
ebook_ctx.fast_epub_parse = 0;
|
||||
ebook_ctx.tn_qscale = 1.0;
|
||||
ebook_ctx.tn_qscale = 2;
|
||||
|
||||
ebook_500_ctx = ebook_ctx;
|
||||
ebook_500_ctx.content_size = 500;
|
||||
@@ -1141,14 +1141,14 @@ int main(int argc, char **argv) {
|
||||
ebook_fast_ctx = ebook_500_ctx;
|
||||
ebook_fast_ctx.fast_epub_parse = 1;
|
||||
|
||||
comic_ctx.tn_qscale = 1.0;
|
||||
comic_ctx.tn_qscale = 2;
|
||||
comic_ctx.tn_size = 500;
|
||||
comic_ctx.enable_tn = TRUE;
|
||||
comic_ctx.log = noop_log;
|
||||
comic_ctx.logf = noop_logf;
|
||||
comic_ctx.store = counter_store;
|
||||
|
||||
comic_big_ctx.tn_qscale = 1.0;
|
||||
comic_big_ctx.tn_qscale = 2;
|
||||
comic_big_ctx.tn_size = 5000;
|
||||
comic_big_ctx.enable_tn = TRUE;
|
||||
comic_big_ctx.log = noop_log;
|
||||
@@ -1160,7 +1160,7 @@ int main(int argc, char **argv) {
|
||||
media_ctx.store = counter_store;
|
||||
media_ctx.tn_size = 500;
|
||||
media_ctx.tn_count = 1;
|
||||
media_ctx.tn_qscale = 1.0;
|
||||
media_ctx.tn_qscale = 2;
|
||||
media_ctx.max_media_buffer = (long) 2000 * (long) 1024 * (long) 1024;
|
||||
|
||||
ooxml_500_ctx.content_size = 500;
|
||||
|
||||
Reference in New Issue
Block a user