'Decode all the camera-specific MakerNote formats
Note is the data that comprises this MakerNote.
The MakerNote will likely have pointers in it that point to other
parts of the file. We\'ll use self.offset as the starting point for
most of those pointers, since they are relative to the beginning
of the file.
If the MakerNote is in a newer format, it may use relative addressing
within the MakerNote. In that case we\'ll use relative addresses for
the pointers.
As an aside: it\'s not just to be annoying that the manufacturers use
relative offsets.  It\'s so that if the makernote has to be moved by the
picture software all of the offsets don\'t have to be adjusted.  Overall,
this is probably the right strategy for makernotes, though the spec is
ambiguous.
The spec does not appear to imagine that makernotes would
follow EXIF format internally.  Once they did, it\'s ambiguous whether
the offsets should be from the header at the start of all the EXIF info,
or from the header at the start of the makernote.'

def decode_maker_note(self):

    note = self.tags['EXIF    MakerNote']
    make = self.tags['Image    Make'].printable
    if ('NIKON' in make):
        if (note.values[0:7] == [78, 105, 107, 111, 110, 0, 1]):
            logger.debug('Looks    like    a    type    1    Nikon    MakerNote.')
            self.dump_ifd((note.field_offset + 8), 'MakerNote', tag_dict=makernote.NIKON_OLD)
        elif (note.values[0:7] == [78, 105, 107, 111, 110, 0, 2]):
            if self.debug:
                logger.debug('Looks    like    a    labeled    type    2    Nikon    MakerNote')
            if ((note.values[12:14] != [0, 42]) and (note.values[12:14] != [42, 0])):
                raise ValueError("Missing    marker    tag    '42'    in    MakerNote.")
            self.dump_ifd(((note.field_offset + 10) + 8), 'MakerNote', tag_dict=makernote.NIKON_NEW, relative=1)
        else:
            logger.debug('Looks    like    an    unlabeled    type    2    Nikon    MakerNote')
            self.dump_ifd(note.field_offset, 'MakerNote', tag_dict=makernote.NIKON_NEW)
        return
    if make.startswith('OLYMPUS'):
        self.dump_ifd((note.field_offset + 8), 'MakerNote', tag_dict=makernote.OLYMPUS)
    if (('CASIO' in make) or ('Casio' in make)):
        self.dump_ifd(note.field_offset, 'MakerNote', tag_dict=makernote.CASIO)
        return
    if (make == 'FUJIFILM'):
        endian = self.endian
        self.endian = 'I'
        offset = self.offset
        self.offset += note.field_offset
        self.dump_ifd(12, 'MakerNote', tag_dict=makernote.FUJIFILM)
        self.endian = endian
        self.offset = offset
        return
    if (make == 'Canon'):
        self.dump_ifd(note.field_offset, 'MakerNote', tag_dict=makernote.canon.TAGS)
        for i in (('MakerNote    Tag    0x0001', makernote.canon.CAMERA_SETTINGS), ('MakerNote    Tag    0x0002', makernote.canon.FOCAL_LENGTH), ('MakerNote    Tag    0x0004', makernote.canon.SHOT_INFO), ('MakerNote    Tag    0x0026', makernote.canon.AF_INFO_2), ('MakerNote    Tag    0x0093', makernote.canon.FILE_INFO)):
            if (i[0] in self.tags):
                logger.debug(('Canon    ' + i[0]))
                self._canon_decode_tag(self.tags[i[0]].values, i[1])
                del self.tags[i[0]]
        if (makernote.canon.CAMERA_INFO_TAG_NAME in self.tags):
            tag = self.tags[makernote.canon.CAMERA_INFO_TAG_NAME]
            logger.debug('Canon    CameraInfo')
            self._canon_decode_camera_info(tag)
            del self.tags[makernote.canon.CAMERA_INFO_TAG_NAME]
        return
