IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2012/11/21)2012/11/22 
paulgardiner Robin_Watts: ping12:29.26 
Robin_Watts pong12:29.31 
paulgardiner Found the problem with saving. MuPDF can't save back to the same file... perhaps unsurprisingly... although it surprised me. :-)12:30.12 
Robin_Watts paulgardiner: Ah, well, it probably can save back to the same file, but only if you've run through and loaded every object into memory first :)12:30.58 
paulgardiner I wondered that.12:31.16 
Robin_Watts which is a non-starter I feel.12:31.26 
paulgardiner I'm guessing that's probably not a good idea, and a tmp file would be better12:31.30 
Robin_Watts yeah.12:31.42 
paulgardiner ok, ta12:31.50 
tor8 paulgardiner: Robin_Watts: oh no. don't tell me you're doing fopen("output.pdf", "w") and clobbering, instead of the safe juggling of creating to a temp file and renaming....13:07.01 
Robin_Watts tor8: I think he's doing the latter now :)13:07.22 
tor8 we certainly don't want a crash, ^C or other error to destroy the user's file!13:07.31 
paulgardiner Yes, I suppos the direct output to the original file wasn't the brightest of ideas, even if MuPDF didn't need access to the original during writing13:10.41 
  But I'm sure there are still many ways we'll find to clobber the users file even without that. :-)13:12.04 
Robin_Watts So a large percentage of time in mupdf is spent calling the divide function.13:15.27 
  Can I figure out where in mupdf that's from though? can I hell.13:15.39 
tor8 fz_idiv?13:16.27 
Robin_Watts paulgardiner: Did you have a funky trick for dividing by 2^n -113:16.40 
  ?13:16.42 
  tor8: no, __aeabi_idiv13:17.01 
tor8 Robin_Watts: right. because we have a fz_idiv used in the scan converter13:17.18 
Robin_Watts yeah.13:17.23 
paulgardiner Robin_Watts: yes. I'll see if I can remember it13:17.44 
Robin_Watts It's possible that fz_idiv ends up calling __aeabi_idiv...13:17.46 
paulgardiner Robin_Watts: I sort of remember it, but exact details depend on the range of the thing being divided and the bit-size of the result required13:23.09 
Robin_Watts http://www.hackersdelight.org/divcMore.pdf ?13:23.28 
  oh, ass, this is / ((2^n)+1)13:23.57 
paulgardiner Something similar may work. The series then alternates sign13:25.15 
  1/(2^n + 1) = 1/2^n * (1 - 1/2^n + 1/2^2n - 1/2^3n + 1/2^4n ... )13:27.04 
Robin_Watts 1/17 is the one I'm looking at now.13:27.36 
  That's alternating 4 bits on, 4 bits off.13:28.18 
  (x>>4)-(x>>8)+(x>>12)-(x>>16) etc13:28.36 
paulgardiner yep13:28.51 
  Same trick13:29.08 
  There was some sort of extra bit concerning working out if there was an infinite carry, but I can't remember how it went now.13:30.24 
Robin_Watts tor8, paulgardiner: Are we ever planning to allow the android app to change the amount of antialiasing we use?14:46.35 
  If not, we can predefine AA_BITS to 8 and save some time.14:46.51 
tor8 Robin_Watts: I doubt it; that's just for mudraw really?14:47.51 
Robin_Watts Cool.14:47.59 
tor8 at least that's the only place I see it as useful.14:48.13 
  even eink devices have grayscale screens14:48.21 
Robin_Watts For grayscale screens, we'd presumably predefine it to 4 or something.14:49.49 
tor8 Robin_Watts: we may want to do that anyway, since it's just used for vector art15:57.20 
  and we don't do gamma correct alpha blending anyway...15:57.32 
  which is something we really should be doing for text at least15:57.42 
  (i.e. do the transparency blending and compositing in a linear color space)15:58.12 
Robin_Watts predefining it to a fixed value enables the compiler to optimise out lots of divides, so they don't really show up in the profiles.15:58.14 
tor8 Robin_Watts: yeah. predefining it is definitely the way to go on non-desktop apps.15:58.33 
  should probably do the same for iOS15:58.38 
Robin_Watts So the slowest file I have has the top of the profile that looks like:15:58.48 
  22.67 4.18 4.18 3446 1.21 2.17 fz_scan_convert_aa15:59.06 
  19.14 7.71 3.53 912 3.87 3.87 fz_subsample_pixmap_ARM15:59.08 
  12.91 10.09 2.38 94070 0.03 0.03 scale_row_to_temp115:59.10 
  7.65 11.50 1.41 457 3.09 4.86 read_faxd15:59.12 
  7.10 12.81 1.31 22478167 0.00 0.00 non_zero_winding_aa15:59.13 
  6.56 14.02 1.21 22636515 0.00 0.00 add_span_aa15:59.15 
  6.07 15.14 1.12 459 2.44 2.44 fz_unpack_tile15:59.17 
  3.96 15.87 0.73 1281069 0.00 0.00 fz_paint_affine_color_N_near15:59.18 
  3.85 16.58 0.71 1513292 0.00 0.00 fz_paint_span_with_color_4 2.82 17.10 0.52 2845493 0.00 0.00 find_changing15:59.20 
  2.06 17.48 0.38 459 0.83 12.71 decomp_image_from_stream15:59.21 
  1.19 17.70 0.22 50402 0.00 0.00 scale_row_from_temp15:59.23 
tor8 a substantial amount of line-art on that file?15:59.48 
Robin_Watts Now, that page has 160 fax images on it, each 15571 wide and 100 or so tall.15:59.50 
  I'm not aware of there being *any* line art on that page.16:00.18 
  I mean, presumably there must be, but...16:00.41 
chrisl Behing the images? I've seen that before16:01.23 
  s/Behing/Behind16:01.35 
Robin_Watts chrisl: I'm thinking so. Just taking the file to bits now.16:02.13 
chrisl I had one a few years ago that had a page full of transparency, then the entire page covered by a scanned, opaque image!16:03.17 
tor8 Robin_Watts: do we still use the scan converter to antialias the image edges?16:03.46 
Robin_Watts As far as I can tell, it's just images.16:03.59 
kens2 why do you think it has linework ?16:04.16 
Robin_Watts with clipping paths.16:04.28 
  kens2: see the profile I posted.16:04.34 
kens2 You can apply clip to images16:04.39 
Robin_Watts fz_scan_convert_aa etc.16:04.41 
  kens2: Yes, I am aware of that.16:05.00 
kens2 SO that's scan convertting as path ?16:05.08 
Robin_Watts kens2: That's the point at discussion.16:05.19 
  sorry, fz_scan_convert_aa is the code that scan converts a path, with antialiasing, yes.16:05.40 
tor8 Robin_Watts: if clips are rectangular and unrotated, they should short circuit to scissor operations in the draw device16:05.49 
Robin_Watts The ctm is 90 degrees, and there are rectangle for paths.16:06.25 
  Ah, right. Each image is not accompanied with a clip path.16:27.39 
  each image first has the area it will fill cleared by having a white rectangle drawn there first.16:27.57 
kens2 Ah, stupid creator16:28.12 
Robin_Watts But I can't believe that scan converting a rectangular box should take that long.16:31.26 
kens2 Packing up time, goodnight everyone17:10.13 
Robin_Watts tor8: Scan converter optimisation commit on my repo for your consideration.20:01.18 
henrys` powerline networking experts: if I get say this http://www.amazon.com/Netgear-XAVB5004-Powerline-Network-Adapter/dp/B004PA9PBQ I'll be able to plug 2 cluster machines into it and we'll be able to ssh to it and all that stuff like a regular cluster server? It won't work if this bridge (or actually a switch) won't allow incoming ssh connections to pass through. The main use of these devices is for home media stuff where incoming20:05.58 
  connections like we want would be undesirable.20:05.58 
Robin_Watts henrys`: Powerline network adapters work at the ethernet level.20:07.54 
  They read packets in, retransmit across the powerline, and play them out again.20:08.11 
  They work at a lower level than ssh etc.20:08.46 
  That seems expensive.20:09.20 
henrys` this is more than an adapter it's a bridge.20:09.41 
Robin_Watts It's gigabit, which is good.20:09.58 
henrys` which I assume can firewall incoming stuff20:10.13 
Robin_Watts but basically all you need is 2 plug units and a switch, right ?20:10.14 
  No, no firewall.20:10.33 
  Why do you need a firewall?20:11.07 
  Your home router that connects to the net will firewall your network from the net.20:11.31 
henrys` The product that I sent the link for is a bridge and an adapter, I assume the adapter is for my router.20:11.32 
  I am concerned this netgear switch is going to firewall incoming connections, I don't want it to do that.20:12.20 
Robin_Watts Right, I'm looking at the amazon page.20:12.26 
henrys` if it works it will be fantastic. I'll move the cluster machines and a network printer to the basement... wonderful.20:13.22 
Robin_Watts http://www.netgear.com/home/products/powerline-and-coax/high-performance/xavb5004.aspx20:13.24 
  So, basically you plug the black box into the basement, and that gives you 4 ethernet sockets.20:13.49 
  You plug the white thing into a socket next to you router, and use ethernet to connect from router to the white thing.20:14.18 
  The only firewall is the one in your router.20:14.36 
henrys` okay than it should work great.20:15.04 
Robin_Watts yeah, looks ideal.20:16.55 
 Forward 1 day (to 2012/11/23)>>> 
ghostscript.com
Search: