YUV picture improvement
processor based on histogram
modification
Preliminary specification
File under Integrated Circuits, IC02
Philips Semiconductors
October 1994
Philips SemiconductorsPreliminary specification
YUV picture improvement processor based
on histogram modification
FEATURES
• Picture content dependent non-linear Y and U, V
processing by histogram analysis
• Adaptive and variable gamma correction controls
• Black and white stretch capabilities
• Transparent I2C-bus control
• On-chip window generator for valid histogram
measurement and black detection.
GENERAL DESCRIPTION
The TDA9170 is a transparent analog video processor
with a YUV interface. It offers three main luminance
processing functions any combination of which can be
selected.
The luminance transfer is controlled in a non-linear
manner by the distribution (in 5 discrete histogram
sections) of the luminance values measured in a picture.
As a result, the contrast ratio of the most important parts of
the picture will be improved.
Black restoration is available in the event of a set-up in the
luminance signal. A variable gamma function, after the
histogram conversion, offers the possibility of excellent
brightness control.
To maintain a proper colour reproduction, the saturation of
the U and V colour difference signals are controlled as a
function of the actual non-linearity in the luminance
channel.
The TDA9170 concept has maximum flexibility with the
optional on-board I
select) and window control. The supply voltage is 8 V. The
device is mounted in a 32 pin SDIP envelope.
DGND25digital ground
VOUT26colour difference V output
DT27test option
UOUT28colour difference U output
TM29test option
SDA30serial data input/output
SCL31serial clock input (I
ADR32address select input (I
6reference supply voltage output
(+4 V)
9analog supply voltage
measurement loop
24digital supply voltage (+5 V)
2
C-bus)
(I
2
C-bus)
2
C-bus)
TDA9170
Fig.2 Pin configuration.
October 19944
Philips SemiconductorsPreliminary specification
YUV picture improvement processor based
on histogram modification
FUNCTIONAL DESCRIPTION
Y input selection and amplification
The dynamic range of the luminance input amplifier can be
switched between 0.3 and 1 V (excluding sync) either
externally (pin AMPSEL) or by I
Amplitudes that exceed the corresponding specified range
(e.g. the sync) will be clipped internally. The input is
clamped during the logic HIGH period of the clamp which
is defined by the sandcastle reference and should be
DC-decoupled with an external capacitor.
Black offset detection and correction
The black detector measures and stores the blackest part
of the picture within a defined window in each field. Any
difference between this value and the value measured
during the black clamp period is regarded as black offset.
In a closed loop configuration, the black offset is held until
a predefined value of the full scale (FS) value is fed back
to the input stage where it is partly compensated for.
Depending on the loop gain, 30% to 50% of the offset
value is counteracted. The loop gain is also a function of
the adaptive and variable gamma settings. The black
offset correction mechanism can be switched on and off by
2
C-bus via the BON bit (see Table 6), or externally with
the I
the black offset on/off switch (BOF pin 11).
Two external time constants are required to ensure correct
performance of the black detector; a loop filter time
constant (TAUBL) for the loop dynamics and a time
constant for memorizing the darkest parts of the picture
(TAUBP) in just one field. During the field retrace the time
constant TAUBP is first sampled and then preset to a value
that corresponds to the maximum black offset.
The corrected black offset is related to the nominal signal
amplitude which is reset to 100% FS via an amplitude
stretch function. Luminance values beyond FS are not
affected. Additionally, this offset is also used to set the
adaptive gain (see Section “Adaptive gamma”).
Histogram measurement
The histogram distribution is measured in real time over
five segments (HM1 to HM5) within a defined window
period of each field. During the window period, the video is
in one segment, a corresponding external capacitor C
is loaded via a current source. At the end of the field five
segment voltages are stored from the external capacitors
into on-board memories. The external capacitors are
discharged and the measurements are restarted.
2
C-bus (AMPSEL bit).
HMx
TDA9170
Any part of the picture that does not contribute to the
information within the total picture should be omitted from
the histogram measurement. The miscount detector
disables measurements until it detects changing parts.
Additionally, luminance values close to FS (or white) do
not contribute sufficiently in order to maintain the absolute
light output. This procedure is allowed because the eye is
less sensitive to details in white.
As the miscount detector shortens the effective
measurement period and, because of spreads of internal
and external components, the current source is controlled
within in a closed loop so as to maintain a constant
average value of the sum of the segment voltages. The
dominant time constant of the closed loop is external and
can be tuned with an appropriate capacitor connected to
TAUHM (pin 22).
Processing of the measured histogram values
F
IELD AVERAGING OF HISTOGRAM VALUES
With very rapid picture changes, also related to the field
interlace, flicker might result. The histogram values are
averaged at the field rate to reduce these flicker effects.
The time constant of the averaging process is adapted to
the speed of the histogram changes.
DAPTIVE GAMMA
A
The output voltage of the first segment is fed to a variable
gain amplifier with a gain between 1 and 3. In this way
luminance values in the ‘black’ segment have a larger
weight. In our perception black parts are expanded, as
occurs with gamma control. However, the effective
contribution to the non-linear gain is only relevant for
moderate segment voltages and hence the term adaptive
gamma.
The adaptive gamma gain is amax-function of a fixed gain
part and a dynamic gain part. The fixed gain part can be
set externally with the adaptive gamma gain control
(ADGAM) or via the I2C-bus.
The dynamic part of the adaptive gamma gain is controlled
by the measured black offset value from the black
detector.
October 19945
Philips SemiconductorsPreliminary specification
YUV picture improvement processor based
on histogram modification
ADAPTIVE WHITE-POINT STRETCHING
For dominant HM4 and HM5 voltages or large white parts
the histogram conversion procedure makes a transfer with
large gain in the white parts. However, the amount of light
being emitted from the picture is considerably reduced.
The white stretcher introduces additional overall gain for
increased light production and, as a result, violates the
principle of having a full-scale reference.
S
TANDARD DEVIATION
For pictures in which segments of the histogram
distribution are very dominant, with respect to the others,
the non-linear amplification should be reduced to
compensate for pictures with a flat histogram distribution.
The standard deviation detector measures the spread of
the histogram distribution in the segments HM1 to HM5
and modulates the user setting of the non-linear amplifier.
Non-linear amplifier
The stored segment voltages, relative to their average
value and averaged over two fields, determine the
individual gain of each segment in such a way that
continuity is guaranteed for the complete range. The
maximum and minimum gain of each segment is limited.
Apart from the adaptive white-point stretching the black
and white references are not affected by the non-linear
processing. The amount of linearity can be controlled
externally at AMPNLA (pin 3) or via the I
Variable gamma function
2
C-bus.
TDA9170
Timing generator
The TDA9170 is equipped with a transparent internal
timing generator for window purposes. As a timing
reference the relevant sandcastle (SC) can be used. The
window enables the black measurement and the
histogram measurement circuitry. The internal timing
generator is basically intended for system invariant
operation. The default window handles all existing norms
and disables measurement in subtitles or logos. This
default window is preset at power-up and can be selected
with a logic HIGH level at the default window select DWS
(pin 1). If not selected the blanking of the sandcastle will
define the window borders.
2
However, using the I
control bits (see Table 3), the window format can also be
user-programmed. The horizontal window generator
synchronizes on the rising edge of the burst key/clamp key
of the external sandcastle reference with an adjustable
window start and stop delay. The vertical window
generator synchronizes on the falling edge of the first burst
key/clamp key after a field pulse recognition.
2
I
C-bus specification
The I2C-bus is designed for transparent use. At power-up
all registers are preset for system invariant and external
control. All pins related to the I2C-bus can be left
open-circuit when the I2C-bus is in the standby mode. If
the sleep mode bit in the control register is set all settings
are left to bus control. For the relevant registers and
addresses see Tables 2 to 8.
C-bus and setting the WD1 and WD2
As well as the histogram conversion, a variable gamma
function can be applied to ensure excellent brightness
control. It is intended as an alternative to the DC-offset of
the classic brightness user control; it maintains the black
and white references. The gamma ranges from 0.5 to 1.5.
The gamma can be set externally at VARGAM (pin 2) or
via the I
Colour compensation
Non-linear luminance processing influences the colour
reproduction, mainly the colour saturation. Therefore, U
and V signals are also processed for saturation
compensation. The U and V input signals are clamped
during the logic HIGH period of the clamp which is defined
by the sandcastle reference and should be DC decoupled
with external capacitors.