Repeating the same gdaladdo command line (ex : 'gdaladdo -r average world_dted0.tiff 2') make the image size increase each time of 128x128xsizeof(pixel type).
I propose the following patch in libtiff to fix that (in TIFFAppendToStrip, in tiff_write.c):
--- gdal-1.4.2.ori/frmts/gtiff/libtiff/tif_write.c 2007-07-28 13:59:18.000000000 +0200
+++ gdal-1.4.2/frmts/gtiff/libtiff/tif_write.c 2007-07-29 18:42:10.000000000 +0200
@@ -642,8 +642,8 @@
* space, so such scheme is not too much effective.
*/
if (td->td_stripbytecountsorted) {
- if (strip == td->td_nstrips - 1
- || td->td_stripoffset[strip + 1] <
+ if (strip != td->td_nstrips - 1
+ && td->td_stripoffset[strip + 1] <
td->td_stripoffset[strip] + cc) {
td->td_stripoffset[strip] =
TIFFSeekFile(tif, (toff_t)0,