Feature Details

Motion Estimation

Flicker-free video requires 25-30 consecutive frames to be displayed every second however, typically in any given second much of the image displayed will remain unchanged. By performing a delta analysis between consecutive frames it is possible to determine which areas of the image have changed or moved. Significant compression rates can then be achieved by only storing information about the changes from one frame to the next rather than storing the whole frame.

In practice, motion estimation does this by dividing a video frame into smaller blocks (e.g. 16 x 16 pixels) and, for each of the blocks, determining within a search area (typically +/- 16 pixels from the originating position) the location of a match in the previous frame. If none of the positions match perfectly the algorithm has two choices: to either conclude that all the differences are too great which must mean that the block is a new entity or has moved outside of the search area or, in the case of smaller differences, to accept the best match even though this match is not perfect.

Implementation of motion estimation a key differentiator for video encoders

Executing this motion estimation in an exacting fashion (i.e. Full Search) has a very high computational intensity which, particularly at higher resolutions, becomes unfeasible for a mobile device where size and power consumption are design constraints. It is therefore necessary to make performance compromises which are realised in reduced compression rates or lower image quality.

A number of different methods and search strategies have been developed for motion estimation. The choice of search strategy coupled with the implementation of the motion estimation algorithm is a key differentiator for video encoders as a better solution naturally means a reduced load to the device processor without compromising quality or compression rates.

Hantro has developed a proprietary motion estimation method called Indexed Full Search which, when compared to the full search method, reduces the number of calculations required in a +/- 16 pixel search area by a factor of 16 with an absolute minimal loss of image quality. This no-compromise reduction in computational complexity brings tremendous advantages to encoder implementations targeted for handheld devices. Software implementations benefit from significantly reduced load to the CPU and hardware implementations benefit from a reduction in the logic clock frequency needed.

Clock Gating

Clock gating is a power-saving technique used in system-on-chip designs. The basic concept is to de-activate the clocks for functions when they are not required and thereby reducing their power consumption.

Automatic Clock Gating

Implemented during synthesis, automatic clock gating can achieve up to a 70% reduction in the overall power consumption of Hantro's codecs. Although extremely effective, it cannot reduce the dynamic power consumption of unused blocks to absolute zero because it is unable to de-activate the clock for all of the functions within the block.

Dynamic Clock Gating

For all multi-format products, Hantro has further enhanced the automatic clock gating process by implementing a dynamic clock gating feature. By detecting the formats being used, the feature completely shuts down the blocks reducing their dynamic power consumption to absolute zero. Hantro's dynamic clock gating can add up to an additional 30% reduction in power consumption after automatic clock gating has been applied.

Programmable Color Space Conversion

Color Space Conversion

Video coding systems use a colour space called YCbCr where compression efficiency can be enhanced by sub-sampling the color information of the input images. As most displays require the input data in RGB format, the system has to perform YCbCr to RGB conversion after decoding the video. Hantro's 5150, 5550, 6150, 6170 and 7170 products incorporate fully adjustable YCbCr to RGB color conversion. The conversion coefficients can be set to use the preset values of either ITU-R BT.601 or BT.709 recommendations. The user can also manually modify each conversion parameter.

Alpha Blending

Hantro color space conversions also provides for complete adjustment over the R, G and B channel length and positioning inside a 32-bit address and allows use of the alpha channel giving control over the transparency or opacity of the output picture. This feature enables external alpha blending which can be used, for example, to create partially visible UI objects on top of the video playback.

De-blocking

Compressed MPEG-4 data often contains coding artefacts such as blocking, ringing and basis pattern breakthrough. Caused by the quantization of the frequency components of the data blocks to be encoded, blocking is the most visible of these and in order to ensure a hiqh-quality video experience it is vital to minimize the effect.

Reducing the blocking effect has proven to be so important that both the H.264 and VC-1 video standards have incorporated a de-blocking filter.

During encoding the blocking effect can be minimized by using an adequate bitrate however, this is in contrast to the requirements of applications where lower bitrates for streaming or smaller file sizes for transfer are limiting factors. In reality, it is not often possible for the user to affect the encoding, the only option left being to filter the decoded data.

Scaling

Image scaling is a central part of all player applications. Content comes in a myriad of sizes and in order to enjoy it all with full-screen playback, image scaling is a must-have feature. Furthermore it would be impossible to view a multimillion pixel JPEG image without being able to down-scale it to the screen size.

Hantro post-processing features a superb quality third degree polynomial interpolation for stepless up-scaling of up to three times the original image size. Down-scaling is implemented with a proprietary averaging algorithm that is completely aliasing effect free.

Rotation

Cell phone displays tend to have different dimensions from the 4:3 ratio screens that we are used to. Often the display height is larger than its width. As the recorded clips are usually oriented the wrong way with respect to the display dimensions, much of the display is not utilized during playback. By using rotation and image scaling it is possible to playback the video sequences at the maximum size the display offers. For video telephony applications the horizontal flipping effect can also be used to emulate a mirror-image of the caller.

Brightness, Contrast and Saturation

Brightness, contrast and saturation are well-known features on any TV. During the color conversion process the brightness, contrast and intensity levels of the video can be set to whatever pleases the eye.

Cropping

Cropping is a must-have feature for any application that supports the capture and display of large JPEG images. It enables the user to view areas of the image at the originating resolution on a smaller display. Together with the scaling function, cropping also presents the means for digital zooming.

Picture in Picture

Picture in picture allows the free positioning of the output image inside the video memory. This can be effectively used to enable multiple video sources to be displayed at the same time. For example, one instance of the decoder can write its output to the top-left corner of the video memory, while the second reserves the bottom-right corner.

A common example of this is in video call application, where the viewfinder image is displayed at the top corner while the majority of display shows the person you are speaking with. Another use case is the simultaneous viewing of several mobile television channels.

Masking

Often in video player applications pull-down menus, logos, control buttons etc. can be seen on the display during video playback. A common way to implement this is to write on top of each decoded frame in the video memory before it is displayed.

By using the Hantro masking feature, two separately programmable rectangular areas of scalable size and position are blocked from refreshing with each video frame, this means the user interface does not have to be redrawn for every frame resulting in a simpler implementation and performance gain.

Dithering

Mostly due to power saving, performance and cost reasons, many handset displays have a limited colour range of 16 or even 12 bits per pixel. The low amount of different colour tones leads easily into false contouring which is evident especially if a picture contains smooth, gradient surfaces, such as the sky.

Dithering simulates missing color tones by mixing the existing ones. The mixing of the colors takes advantage of the averaging quality the human eye which will create an illusion of more colours than the image actually contains.

De-interlacing

Much of the video content available today has been created for analog television displays that use interlaced technology. Typically computer screens, portable device screens and high definition LCD televisions use progressive scan (non-interlaced) technology; displaying interlaced video on a non-interlaced screen can result in some distortion during playback, particularly during fast action sequences.

By de-interlacing the video after the encoding process this effect can be eliminated.