Macro Revuenon 1:3,5 / 35mm servicing 
Saturday, September 27, 2008, 06:34 PM - Servicing
Here is a repair guide for this m42 lens:

Even if "macro" is mentioned, this is not a macro lens. At best it is a close-up lens, but not macro. It is obviously designed to be really cheap to manufacture, as the body is entirely made of cheap plastic, except 7 screws and the diaphragm blades (the whole lens weights only 130g). It is a preset lens, in order to save a bit of money on the manufacturing (no need for any mechanical linkage).
As Revuenon did not produced lenses, this one is available under several different brandings.

First, remove the 4 rear screws:

Remove the rear part, and you should now see this :

Surprise! There is yet another mount thread. The first ring we removed is in fact a T to m42 adapter, and the lens is indeed a T mount lens (probably in order to easily be sold for different mounts).
Remove the rear ring.

The two rear rings that we removed :

Remove another rear ring, and you will see this :

Once again, remove the rear ring, up to this step:

Now, let's start to remove optical elements. Remove the rear ring (using a lens spanner or a similar tool) and the rear optical element.

Rear optical element :
I've put a soft pencil mark on the side of the glass element, toward the front, in order to remember which side goes front when remounting the lens. Usually, each time I remove an optical element, I do this.

Lens body with the rear element removed (rear ring on the right) :

Remove another optical element from the rear :

Now, let's have a look at the lens body from the front side :

Unscrew the front ring :

Unscrew the center part from the body :

Don't think about removing the front optical element, as it is glued to conical plastic part.

Under the conical element, there is one last ring which can be removed, and allows access to the last optical element (the one I wanted to clean) :

And here is it, we have removed nearly every possible part.
  |  0 trackbacks   |  permalink   |  related link

Javascript to work around CSS limitation: expand to container width 
Sunday, September 14, 2008, 06:47 PM - Web
Having a line of text which is as wide as its container width, sound simple? Well, actually it is not that easy.

For my pic a day gallery I wanted to put a navigation interface under the thumbnails, and to have this navigation interface extend to the full possible width. Of course, as the width changes according to the browser window, it can not be specified in pixels.

A possibility would be to use a single row table, and to put each navigation element within an individual table cell, but first it is far from an elegant solution, second I did not thought about this possibility when doing the navigation interface.

As the navigation interface is made from text elements, I thought about simply using the text-align: justify CSS property. However, this doesn't justify the last line of a paragraph, and in my case the navigation interface is a single line. CSS3 is supposed to address this issue, by the text-align-last property, which allows to set justification method for the last line of a paragraph. Problem: it is not yet supported by browsers.

So here is the trick: using Javascript to increase spacing between words, until it fills the whole container width.
First, set a small words spacing, then iteratively increase it. While doing this, check the element height. When the height increase, it means that your text was wrapped over a new line. You can then roll back words by one step, and you are done: your line now fills the whole width:

function expandNavigation() {
document.getElementById('config').style.opacity = 0;
navi = document.getElementById('navigation'); = 0;
var h0 = navi.scrollHeight;
var em = 0.2;
var em_inc = 0.2;

do {
em += em_inc; = em + 'em';
} while (navi.scrollHeight == h0)
em -= em_inc; = em + 'em';

fadeIn('navigation', 0, 15);
fadeIn('config', 0, 15);

In order to avoid flickering while the word spacing is increased, I also hid the text while iterating, and only made it visible again at when the optimal word spacing is found (the function fadeIn sets the text back to its visible state).
  |  0 trackbacks   |  permalink   |  related link

Servicing a Pentacon 50/1.8 
Wednesday, August 27, 2008, 08:08 PM - Servicing
I had this "Pentacon auto 50/1.8 multicoated" m42 lens lying in bad shape since a few monthes ago(front part going away from rear part). I finally toke some time to fix it, so here is my small repair guide.

First, unscrew the front ring with the markings on it. It is just a plastic ring that is screwed (by the way, it looks really cheap compared to other parts). If you are lucky, you will be easily able to unscrew it, if not you will probably need to use a rubber ring or something similar to improve your grip while unscrewing it.

Now, remove the thin screw from the inner ring.

You can now unscrew the outer inner ring. I used some spanners, but you can probably also use some screwdrivers.

You can now access the front part of the optical elements, and unscrew them. If you unscrew the outer ring with the two tabs they will come in one single piece, if you unscrew the inner ring with the two tabs they will come into two pieces.

You can now see the front of the diaphragm.

By the way, if you only need to adjust infinity focus, there is no need to remove any optical element. Once you removed the front rings, you should see three big screws. Those are used to adjust infinity (more about this in a few steps).

In my case, as the front part was loose, I had to go further. Now, let's look at the rear part. Remove the three rear screws, and you can remove the rear part (mount and aperture ring).

Unscrew the optical barrel, and you should now have this part:

If your lens is in correct shape, you will perhaps not be able to remove the optical barrel yet because a metal cam is blocking it.

Beware not to loose the small bearing which is used for the M/A switch. I would suggest you to remove it and to only put it back when reassembling the lens.

Remove the two screws which hold the can.

After removing this cam, you should be able to remove the optical barrel (if not yet done). If you need to replace the grease from the helicoid, it's the right time to do it. Under the cam, there is yet another bearing along with a small spring.

As with the previous one, I would suggest you to remove the bearing and to only put it back when doing the final reassembly of the lens. If you loose it, you will have a working but stepless aperture ring.
Reassembling is "just" a matter of putting everything back. The only thing that should take a bit of time is readjusting infitity focus.
A bit of explanation about this: when focusing toward infinity, the optical block goes toward the rear of the lens, and when focusing toward close distance the optical block goes toward the front of the lens. The optical block is held inside the helicoid by the metal cam we removed. When adjusting the focus, if you close focus but the optical block is not properly adjusted, if will move too far from the rear of the lens, and will go out of the cam. You will hear a small clicking noise when it goes out because it will also go out of the diaphragm cam. If this happen, your only solution is to remove again the back of the lens, remove the metal cam, and reassemble everything. That is why I would suggest you to only check infinity (by screwing the three focus adjustment screws, checking infinity, unscrewing the screws, move the focus ring a bit, re-screw the 3 screws, and so on), and only when the infinity focus is fine, you will then be able to focus to the near postion without any issue.
  |  0 trackbacks   |  permalink   |  related link

Thursday, August 21, 2008, 04:20 PM - Audio coding
There is a lot of activity regarding AAC in FFMPEG since July.

The AAC decoder from Summer Of Code (SOC) 2006 is now included within the official FFMPEG tree, after cleanups by Robert Swain. It an AAC-LC and AAC-Main profiles decoder, so it can not yet replace FAAD/FAAD2 as it doesn't decode SBR and PS (used within HE-AAC and HE-AACv2), but it's a good step in the right direction. There is also an SBR decoder in the work, so we will perhaps see this in a few months.

On the encoder side, Konstantin Shishkov has been working on an AAC-LC encoder this summer. While it is not yet competitive with the best AAC-LC encoders, it already provides a good features set, and best of all, it features a psychoacoustic model (it should be the first psychoacoustic model to hit FFMPEG). The psy model is inspired from the 3GPP model, which is a stripped down encoder from Coding Technologies, provided with some basic documentation of the algorithms.
  |  0 trackbacks   |  permalink   |  related link

Back Next