Kisc and Its Structure
![]()
Kisc Package
Kisc package consists of four independent components:
KISC
Kisc is designed to use multiple coding tools to make it a flexible environment for testing new video coding algorithms. It is written in C++. A powerpoint presentation about KISC and C++ can be found here.
According to their functionality, the classes are organised into two major categories: the auxiliary classes and the coding classes.
Auxiliary Classes
The auxiliary classes consist of a collection of image and data input/output classes as well as the base class for storage. The most frequently used classes are:
Mary.h: A template class based on Ary library. It is capable of efficient storage and exchange data in 1-D and 2-D array.
Yuvdef.h: defines 4:2:0 colour image using MARY class.
Yuvio.h: basic input and output classes for 4:2:0 colour images.
Bitstream.h: bitstream input and output class providing bitwise access to disk files or memory.
Coding Classes
The coding classes consist of 4 major parts: codec structure, motion estimation and motion compensation, variable length coding, Spatial compression and quantisation. The basis for KISC is block based, hybrid codec structure similar to that in H.261 and H.263. However, it is possible for one to use a different codec structure by providing one's own codec structure tool. We also include baseline H.263 as one of the codec structure. The base classes for each of the four major parts are:
Codec structure: str_ctl. (str_ctl.h)
Motion estimation and motion compensation: mot_est (mot_est.h)
Variable length coding: Vlcodec (vlcodec.h)
Spatial compression: SPComp (spcomp.h)
The KISC baseline codec uses the following derived classes:
Codec structure: Direct_1
Motion estimation and motion compensation: MBMA
Variable length coding: HvlcMACC
Spatial compression: dct
New tools can be added by writing a compatible class and add its initialisation to "toolsel.cc (class ToolSelection)". You also need to change the command line options part in that file.
RUN KISC
Running KISC is relatively easy as KISC has a comprehensive help mode. If you simply type "Kisc" then return, you will get a simplified help output format that enables a quick start. For a complete options available, type "Kisc -H" then return.
Yuvcnvt
Yuvcnvt is a simple file format conversion program which can convert between different 4:2:0 YUV video sequences. It also enables one to enlarge the size of input image by a factor of 2. The currently supported file formats are:
RAW: each Y, Cb, Cr component of an image is stored in a separate file with extension .Y, .U, .V respectively. The numbering is simple incremental such as: foo0.Y, foo0.U, foo.V; foo1.Y, foo1.U, foo1.V; ......
RAW_BT: a sequence is stored in three files. Each file contains concatenated Y, Cb, Cr components of an image sequences.
RAW_YUV: Y, Cb, Cr of an image is concatenated into a single file with extension .yuv. This format uses four digits to identify a frame number therefore the maximum number of images in a sequence is 10,000 (from 0000 to 9999).
RAW_H263: similar to RAW_YUV except that all images in a sequence are concatenated into a single file. It normally use its extension to indicate the size of the image such as .cif, .qcif etc. But the size of the image in a sequence can be arbitrary. As for all RAW images, it is really necessary to have a text document to specify the size of the image.
Simply type "yuvcnvt" then return, it will give you a brief but sufficient description of command line options.
TMN
TMN stands for Test-Model-Near term (against TML: Test-Model-Long term which is currently used in H26L development) which is used to implement H.263 Version 2 (previously known as H.263+). The version included in the Kisc has been modified so that the format of the coding results can be specified by the user to accommodate different applications. There are two programs in TMN: one for encoder and the other for decoder.
Simply type "tmn" then return will give you a description of the encoder and type "tmndec" then return will give you a description of the decoder.
MSEG
MSEG is a motion image segmentation algorithm using both temporal and spatial information to separate moving objects from the scene. Morphological operators were used to process the raw segmentation map so that small regions in the segmentation map can be removed. There are user definable parameters which can influence the segmentation performance and those parameters are sequence sensitive. Using default value will generally produce a usable results. In order to achieve satisfactory results, one need to experimental with those parameters to decide a set of value that is suitable for your particular job. Those parameters are:
-mreg: number of regions remaining after merge small regions for motion based segmentation map.
-creg: number of regions remaining after merge small regions for colour based segmentation map. Generally speaking, creg should be greater than merg.
-rbm: index for Fanbonacci robust kernel threshold. The serious of robust kernel threshold are: 256,158.2,97.77,60.423,37.34,23.077,14.262,8.814. The default value 1 implies no robust kernel is used. In our experiments, a number of 4 or 5 will produce good results.
-sigma: filtering strength. It should be an even number. The large the number, the stronger the filtering (low pass). It should be in the range of 4 to 16.
-fzth: fuzzy threshold. It should be in the range of 40 to 100. The performance is not very sensitive to this parameter. A value between 70 to 80 will normally give good results.
For more details about the algorithm, please refer to my paper. A postscript version of the paper is available here