Fix dithering bug in merged 4:2:0/RGB565 algorithm

d0 should always be used for the first row, and d1 should always be used
for the second row.

Addresses concerns raised in #95, #81.
4 files changed
tree: 21b59584f9f4b50f6b49a28a45ef31a46c4ea9dc
  1. ci/
  2. cmakescripts/
  3. doc/
  4. java/
  5. md5/
  6. release/
  7. sharedlib/
  8. simd/
  9. testimages/
  10. win/
  11. .gitignore
  12. .travis.yml
  13. acinclude.m4
  14. appveyor.yml
  15. bmp.c
  16. bmp.h
  17. Brewfile
  18. BUILDING.md
  19. cderror.h
  20. cdjpeg.c
  21. cdjpeg.h
  22. change.log
  23. ChangeLog.md
  24. cjpeg.1
  25. cjpeg.c
  26. CMakeLists.txt
  27. coderules.txt
  28. configure.ac
  29. djpeg.1
  30. djpeg.c
  31. doxygen-extra.css
  32. doxygen.config
  33. example.c
  34. jaricom.c
  35. jcapimin.c
  36. jcapistd.c
  37. jcarith.c
  38. jccoefct.c
  39. jccolext.c
  40. jccolor.c
  41. jcdctmgr.c
  42. jchuff.c
  43. jchuff.h
  44. jcinit.c
  45. jcmainct.c
  46. jcmarker.c
  47. jcmaster.c
  48. jcomapi.c
  49. jconfig.h.in
  50. jconfig.txt
  51. jconfigint.h.in
  52. jcparam.c
  53. jcphuff.c
  54. jcprepct.c
  55. jcsample.c
  56. jcstest.c
  57. jctrans.c
  58. jdapimin.c
  59. jdapistd.c
  60. jdarith.c
  61. jdatadst-tj.c
  62. jdatadst.c
  63. jdatasrc-tj.c
  64. jdatasrc.c
  65. jdcoefct.c
  66. jdcoefct.h
  67. jdcol565.c
  68. jdcolext.c
  69. jdcolor.c
  70. jdct.h
  71. jddctmgr.c
  72. jdhuff.c
  73. jdhuff.h
  74. jdinput.c
  75. jdmainct.c
  76. jdmainct.h
  77. jdmarker.c
  78. jdmaster.c
  79. jdmaster.h
  80. jdmerge.c
  81. jdmrg565.c
  82. jdmrgext.c
  83. jdphuff.c
  84. jdpostct.c
  85. jdsample.c
  86. jdsample.h
  87. jdtrans.c
  88. jerror.c
  89. jerror.h
  90. jfdctflt.c
  91. jfdctfst.c
  92. jfdctint.c
  93. jidctflt.c
  94. jidctfst.c
  95. jidctint.c
  96. jidctred.c
  97. jinclude.h
  98. jmemmgr.c
  99. jmemnobs.c
  100. jmemsys.h
  101. jmorecfg.h
  102. jpeg_nbits_table.h
  103. jpegcomp.h
  104. jpegint.h
  105. jpeglib.h
  106. jpegtran.1
  107. jpegtran.c
  108. jquant1.c
  109. jquant2.c
  110. jsimd.h
  111. jsimd_none.c
  112. jsimddct.h
  113. jstdhuff.c
  114. jutils.c
  115. jversion.h
  116. libjpeg.map.in
  117. libjpeg.txt
  118. LICENSE.md
  119. Makefile.am
  120. rdbmp.c
  121. rdcolmap.c
  122. rdgif.c
  123. rdjpgcom.1
  124. rdjpgcom.c
  125. rdppm.c
  126. rdrle.c
  127. rdswitch.c
  128. rdtarga.c
  129. README.ijg
  130. README.md
  131. structure.txt
  132. tjbench.c
  133. tjbenchtest.in
  134. tjbenchtest.java.in
  135. tjexampletest.in
  136. tjunittest.c
  137. tjutil.c
  138. tjutil.h
  139. transupp.c
  140. transupp.h
  141. turbojpeg-jni.c
  142. turbojpeg-mapfile
  143. turbojpeg-mapfile.jni
  144. turbojpeg.c
  145. turbojpeg.h
  146. usage.txt
  147. wizard.txt
  148. wrbmp.c
  149. wrgif.c
  150. wrjpgcom.1
  151. wrjpgcom.c
  152. wrppm.c
  153. wrrle.c
  154. wrtarga.c