<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to DjVuLibre Development</title><link>https://sourceforge.net/p/djvu/discussion/103286/</link><description>Recent posts to DjVuLibre Development</description><atom:link href="https://sourceforge.net/p/djvu/discussion/103286/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 27 Feb 2024 12:57:45 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/djvu/discussion/103286/feed.rss" rel="self" type="application/rss+xml"/><item><title>Bash tab completion</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/1a3618f263/?limit=25#1666</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Since it was annoying me, I have made bash tab completion file for djview. Not sure if this could be added to official packages.&lt;/p&gt;
&lt;p&gt;To use it, simply copy it to /usr/share/bash-completion/completions/djview4 . You should also symlink djview to sjview4 in that directory.&lt;/p&gt;
&lt;p&gt;The file as follows:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# djview4(1) completion                                    -*- shell-script -*-&lt;/span&gt;

_djview4&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;cur&lt;span class="w"&gt; &lt;/span&gt;prev&lt;span class="w"&gt; &lt;/span&gt;words&lt;span class="w"&gt; &lt;/span&gt;cword&lt;span class="w"&gt; &lt;/span&gt;split
&lt;span class="w"&gt;    &lt;/span&gt;_init_completion&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;case&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$prev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;-&lt;span class="s1"&gt;'?'&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;-help&lt;span class="p"&gt;|&lt;/span&gt;--help&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;esac&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;$split&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$cur&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-*&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nv"&gt;COMPREPLY&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;compgen&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-W&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'$( _parse_help "$1" -help )'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;--&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$cur&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$COMPREPLY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;*&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;compopt&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;nospace
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;_filedir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'@(djv|djvu)'&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;span class="nb"&gt;complete&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;_djview4&lt;span class="w"&gt; &lt;/span&gt;djview4&lt;span class="w"&gt; &lt;/span&gt;djview

&lt;span class="c1"&gt;# ex: filetype=sh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikola Smolenski</dc:creator><pubDate>Tue, 27 Feb 2024 12:57:45 -0000</pubDate><guid>https://sourceforge.net205e8450e7a1f581cf6c300e0905627e55764c75</guid></item><item><title>Add PNG conversion to DjVuLibre?</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/e7486bd6fe/?limit=25#4082</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Many screenshots in the more recent versions of video players are now being preferentially saved as lossless PNGs. Would it be worth it to add a PNG to DjVu option to the c44 section of DjVuLibre, as this section already offers JPEG to DjVu conversion, along with PGM and PPM?&lt;/p&gt;
&lt;p&gt;PNG also offers a truer rendering of characters found within images than JPEG does.&lt;/p&gt;
&lt;p&gt;This would make for better starting material, imagewise, for rendering a subsequent DjVu.&lt;/p&gt;
&lt;p&gt;The freeware program MiniDjVu Plus 1.3 offers a PNG to DjVu option.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Jones</dc:creator><pubDate>Mon, 28 Feb 2022 17:12:16 -0000</pubDate><guid>https://sourceforge.netdd3467c5cb388d684ff021b645fa0c71edcb4a0f</guid></item><item><title>DjVu as a Video Format</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/6cd1167bcd/?limit=25#e0e2</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi. Thanks, guys, for your interesting input. It looks like the MKV container system is quite extensible. I can see how any DjVu video that is based on I-frames only would be comparatively big. But it would be a cool project to somehow get a few seconds of DjVu images to play with audio in an MKV.&lt;br/&gt;
DjVu is a format with so much still unrealized potential. The IFF Form and Chunk Registry has a number of other untested (for DjVu) forms and chunks that could be added to DjVu files. That might be another avenue, too.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Jones</dc:creator><pubDate>Mon, 28 Feb 2022 01:29:28 -0000</pubDate><guid>https://sourceforge.netc1b1cc48ca70d07686c951a1b6cb4d978c80f07c</guid></item><item><title>DjVu as a Video Format</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/6cd1167bcd/?limit=50#ea07</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Years ago, AT&amp;amp;T sold DjVu to LizardTech. Inc.  That company then owned two different imaging technologies. DjVu and MrSID.   MrSID was mainly used for maps, as it could do unlimited map sizes both in lossless and lossy formats.   DjVu was used for documents, as it had multiple layers and could store documents far more efficiently.   &lt;/p&gt;
&lt;p&gt;One of the first things the developers did is try DjVu's image format as a replacement for MrSID, and tried MrSID's imaging format as a replacement for DjVu's background image compression.   However, it was quickly found both were about equally effective in storage efficiency, and each was better suited for their usage.   The image format is really slight improvement on what is in JPEG, and is available in video compression.&lt;/p&gt;
&lt;p&gt;The same engineers noticed that of the two, MrSID actually worked pretty well for video.   It was better quality and better compression ratios than whatever the current best video compression technology was in 2000.   But the videos end-ed up jittery.   But that is not surprising as much of video compression is algorithms that take care of avoiding jitteriness between frames.  In a few years that could probably have been solved.&lt;/p&gt;
&lt;p&gt;When LizardTech started to go under, the first people they laid off were the people working on the Video compression.   It was deemed that the existing video compression algorithms were already too far advanced, and even they barely had a commercially viable product.&lt;/p&gt;
&lt;p&gt;In is now more than twenty years later.    Had Yann LeCun and Leon Bottou set out to create a new video format in the 1990's, I have no doubt it would be a core component in what we use today.   But today I wouldn't even consider starting on that research.   Had someone actually finished adapting MrSID, it would have been fantastic for cases when I want to store my movies losslessly, even if it never could compete with H265 on video compression.   But again, even with a free open source license, nobody would consider the research to complete that research today.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dr Bill C Riemers</dc:creator><pubDate>Sat, 19 Feb 2022 23:08:44 -0000</pubDate><guid>https://sourceforge.netda96316423bee0059e69fabf269a358225ce6a44</guid></item><item><title>DjVu as a Video Format</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/6cd1167bcd/?limit=25#b52b</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It is possible, but wouldn't it be a problem that the created file size is too large compared to other video format files?&lt;br/&gt;
I was working on a project in a similar lossless JPEG-2000 format 10 years ago.&lt;br/&gt;
Created DjVu video file size was too large.&lt;br/&gt;
I had to add chunks for audio and chunks for subtitles, and sync audio and subtitles. &lt;br/&gt;
Most importantly, it reduces versatility.&lt;br/&gt;
Another problem is that excessive CPU usage can be an issue for multi-processes. To solve this problem, I tried modifying the DjVu library source to support 8-core, but the CPU usage did not drop much.&lt;br/&gt;
It doesn't help that I can't, even if I want to release the source because I'm on a computer that's broken by lightning.&lt;br/&gt;
It would be very helpful to refer to MatrosKa multimedia container for Video (MKV) format.&lt;br/&gt;
If you do, I wish you success.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Seong-ug Hong</dc:creator><pubDate>Sat, 19 Feb 2022 20:37:56 -0000</pubDate><guid>https://sourceforge.net67120e493caf07d12867dc387c7c6dc3a65efc21</guid></item><item><title>DjVu as a Video Format</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/6cd1167bcd/?limit=25#f9d4</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;br/&gt;
I recently took a video, created a sequence of thousands of jpg images from it, and then converted them to DjVu images. I then tried to put hundreds of these sequential DjVu images through an IrfanView slideshow at high speed, and IrfanView generated a slideshow that looked like a decent video!&lt;br/&gt;
Is it possible to create a DjVu video with a new program, or would that be really difficult?&lt;br/&gt;
Considering that one can store video as lossless pngs, and that DjVu offers more efficient compression than Jpg and other image formats, might this be an interesting project?&lt;br/&gt;
There is a format called Motion JPEG that is something like this.&lt;br/&gt;
Thanks.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Jones</dc:creator><pubDate>Sat, 19 Feb 2022 18:03:56 -0000</pubDate><guid>https://sourceforge.net960de38e06201a1245c3e4fd65cf33366f991721</guid></item><item><title>Improving CCImage::merge_and_split_ccs()</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/3898bf84bf/?limit=25#29a9/3379</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, yes, it may affect table encoding slightly. There is a patch already on gihub, but it's not exactly the same that was applied to DjVULibre at the end. So I would like to adapt it instead of my own patch to keep codebase more close to djvulibre. Unluckily, my only laptop is finally died yesterday and I can get a new one in a few days only + it will take time to setup. So I doubt I can release patched windows binaries this year.  Anyway -feel free to ping me on github issues page.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexander Trufanov</dc:creator><pubDate>Mon, 20 Dec 2021 15:52:25 -0000</pubDate><guid>https://sourceforge.neta25181cde9b062fca2026af0dbea399431bd84ae</guid></item><item><title>Improving CCImage::merge_and_split_ccs()</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/3898bf84bf/?limit=25#29a9</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Alex,&lt;br/&gt;
Do the results of this discussion affect the encoding of my tables with your program?  Is there a new patch related to this? Thanks.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Jones</dc:creator><pubDate>Fri, 17 Dec 2021 11:10:35 -0000</pubDate><guid>https://sourceforge.net4579edb5f3f16cdea1ef5ab1b2dce3666ea83b9c</guid></item><item><title>Improving CCImage::merge_and_split_ccs()</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/3898bf84bf/?limit=25#b26f/5ec6/7ae2/87ed/9600/3706/1d6b/e9fc/ba16/491f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I have retested with current master branch and appended its results:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;engravings&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;original&lt;/span&gt;    &lt;span class="n"&gt;old&lt;/span&gt; &lt;span class="n"&gt;patch&lt;/span&gt;   &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;patch&lt;/span&gt;   
&lt;span class="mi"&gt;4&lt;/span&gt;   &lt;span class="mi"&gt;43650&lt;/span&gt;     &lt;span class="mi"&gt;43717&lt;/span&gt;        &lt;span class="mi"&gt;43680&lt;/span&gt;    
&lt;span class="mi"&gt;5&lt;/span&gt;   &lt;span class="mi"&gt;36038&lt;/span&gt;     &lt;span class="mi"&gt;36131&lt;/span&gt;        &lt;span class="mi"&gt;36135&lt;/span&gt;    
&lt;span class="mi"&gt;6&lt;/span&gt;   &lt;span class="mi"&gt;67472&lt;/span&gt;     &lt;span class="mi"&gt;67512&lt;/span&gt;        &lt;span class="mi"&gt;67539&lt;/span&gt;    
&lt;span class="mi"&gt;7&lt;/span&gt;   &lt;span class="mi"&gt;92517&lt;/span&gt;     &lt;span class="mi"&gt;92985&lt;/span&gt;        &lt;span class="mi"&gt;93009&lt;/span&gt;    

&lt;span class="n"&gt;f10_200&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
               &lt;span class="n"&gt;doctodjvum&lt;/span&gt;   &lt;span class="n"&gt;cjb2&lt;/span&gt; &lt;span class="n"&gt;original&lt;/span&gt;   &lt;span class="n"&gt;old&lt;/span&gt; &lt;span class="n"&gt;patch&lt;/span&gt;   &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;patch&lt;/span&gt;
&lt;span class="n"&gt;f10_200&lt;/span&gt; &lt;span class="mi"&gt;52735&lt;/span&gt;      &lt;span class="mi"&gt;56516&lt;/span&gt;            &lt;span class="mi"&gt;56084&lt;/span&gt;       &lt;span class="mi"&gt;56101&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;New patch behave in same way as the old patch, but its results are slightly bigger. I guess that's because the old patch didn't affect the case of smallsize CCs. Still it produces smaller djvu for f10_200 test case. Also it slightly outperformed the old patch for one of Engravings.   &lt;/p&gt;
&lt;p&gt;One thing that worries me is the hash function which is seems to be used in GMap for struct Grid_x_CCid. It's:&lt;br/&gt;
&lt;code&gt;return (x.gridi&amp;lt;&amp;lt;16) ^ (x.gridj&amp;lt;&amp;lt;8) ^ x.ccid;&lt;/code&gt;&lt;br/&gt;
And ccid is always -1 in smallsize CC case.&lt;br/&gt;
It will have a collisions for coordinates (1,0) and (0, 256) etc. in this case:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;int ccid = -1;
printf("%u\n", (unsigned int) (1&amp;lt;&amp;lt;16) ^(0&amp;lt;&amp;lt;8) ^ ccid);
printf("%u\n", (unsigned int) (0&amp;lt;&amp;lt;16) ^(256&amp;lt;&amp;lt;8) ^ ccid);
&amp;gt;&amp;gt;4294901759
&amp;gt;&amp;gt;4294901759
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Is this ok?&lt;br/&gt;
Also may be unsigned shorts are safer for gridi/j in struct Grid_x_CCid ?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexander Trufanov</dc:creator><pubDate>Tue, 07 Dec 2021 16:03:37 -0000</pubDate><guid>https://sourceforge.net05bf91cc055ebe1b985022a6b0bad48140f055fd</guid></item><item><title>Improving CCImage::merge_and_split_ccs()</title><link>https://sourceforge.net/p/djvu/discussion/103286/thread/3898bf84bf/?limit=25#b26f/5ec6/7ae2/87ed/9600/3706/1d6b/e9fc</link><description>&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;I'll take the patch then...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Perhaps it's still better to keep it optional? I would test it with bigger datasets&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is it intentional that the first large CC is merged with the small CCs&lt;br/&gt;
(because cc_splitted == 0) ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's not intentional, I just tried to change as less ids as possible, because I didn't measured grid_size and worried about jumping over INT_MAX.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexander Trufanov</dc:creator><pubDate>Sun, 05 Dec 2021 08:10:48 -0000</pubDate><guid>https://sourceforge.nete933e67cd611c043eee225ceefbcf72055c07f71</guid></item></channel></rss>