Professional Documents
Culture Documents
Diigopost: Protected: What To Read For Set-Top-Box Interview?
Diigopost: Protected: What To Read For Set-Top-Box Interview?
Diigopost: Protected: What To Read For Set-Top-Box Interview?
H O LM I E N U XE N G A L B I O S U H T
C O M M A N D S
Search
Category Archives: set-top-box
Recent Posts
AUGUST 16, 2015 · 10:25
Time complexity in algorithms
AM
Ajax
PHP-2
Protected: What to read for Set-top- PHP
Report this ad
Categories
algorithms (3)
Filed under set-top-box Enter your password to view comments.
android (2)
Tagged as set-top-box
C++ (6)
debug (4)
decoder (1)
APRIL 14, 2015 · 11:21
design pattern (1)
AM
device driver (2)
inspiration (1)
Set top box+ kernel (15)
linux (7)
Tuner- operating system (1)
puzzle (1)
Tuner received signal from physical transmission medium,once signal received
set-top-box (2)
tuner isolate a physical channel from a multiplex of channel and convert to
shell (1)
baseband ( I think baseband means remove carrier freqency and get orignal
base band frequency). what it do it lock on a specific frequency and take single stagefright (1)
physical channel which have MPTS like DD_Channel broadcast on xxxx Uncategorized (61)
Demodulator-
Demodulator receive single MPTS signal from tuner and convert it to digital
binary signal, also check for stream error. after this signal is forwarded to
demultiplexer.
Blitter-
A blitter is capable of copying large quantities of data from one memory area to
another relatively quickly, and in parallel with the CPU, whilst freeing up the
CPU’s more complex ISA for more general operations.
Today the vast majority of set top boxes have a blitter – a hardware device for
doing DMA copies of memory with some small combinatorial functions (for
blending). The blitter can copy memory from one or more sources, combine the
data and write to one destination. It can also scale the output. Speeds of copying
are high at scale factors of 1.0 and slower at other scale factors. It is thus easy
and fast to copy whole screens now at high refresh rates. Companies with
graphics libraries for set top boxes compiled their libraries with the blitter drivers
enabled and allowed images and filled boxes to be drawn quickly.
Blitters have been replaced by the modern graphics processing unit. Modern Report this ad
GPUs are designed primarily for 3D graphics, and have added the ability to
modify bitmaps in mathematically advanced ways, allowing arbitrary image
transformations, texture decompression and filtering, shading for illumination
models, alpha blend compositing operations, and depth-buffer
comparison/update.
Memory-
A set-top box may have both SRAM or DRAM/SDRAM or if it is less cost than it
only has DRAM as it is cheap. SRAM will be used to support time critical tasks
such as MPEG processing and DRAM for interactive applications.
Note – SRAM (Static RAM) is faster than DRAM(Dynamic RAM) DRAM require
constantly refersh to retain the data so required more power. Structurally, SRAM
needs a lot more transistors in order to store a certain amount of memory. A
DRAM module only needs a transistor and a capacitor for every bit of data
where SRAM needs 6 transistors. Because the number of transistors in a
memory module determine its capacity, a DRAM module can have almost 6
times more capacity with a similar transistor count to an SRAM module. This
ultimately boils down to price, which is what most buyers are really concerned
with.
The most prominent use of SRAM is in the cache memory of processors where
speed is very essential, and the low power consumption translates to less heat
that needs to be dissipated. Even hard drives, optical drives, and other devices
that needs cache memory or buffers use SRAM modules.
Smart_card-
It is responsible for CA control and placed between DEMOD –>smartCard–
>DEMUX
Demux
An MPEG2 DeMux accepts the digital stream output from the A/D converter, and
extracts the system clock reference from the pack header. Using a function that
measures progress, the system reference clock is reported. All of the above
information is stored in a table that is updated as new stream IDs are found. A
progress report is sent to notify the application, which in turn either pre-
determines what elementary streams needs to be sent to the audio and video
decoders, or selects the stream on the fly using the progress
report’s information.
The tuner receives modulated digital transmission from the antenna and passes
it on to the demodulator. This demodulator takes into account the type of
demodulation (like QPSK ) and forward error correction to give out a transport
stream, which is a digital stream of bytes known as data packets. According to
DVB standards, a transport stream is of the size of 188 bytes. It then goes into
the demux where the content is separated in audio/video packetised elementary
stream (PES) and data packets known as sections, as per DVB standards. PES
is a mechanism to carry audio/video elementary streams in packet format inside
an MPEG-2 transport stream.Sections are the data packets containing
information regarding the audio/video content and other metadata. Once the
demux does its job, audio/video is sent to MPEG-2/MPEG-4 decoder which
gives the output to the RF port to display the video on television. The data
packets are sent to the processor used by the STB software to enable viewing.
This data can be persistent or kept in RAM as per the needs and performance.
Any kind of user request, be it tuning or a purchase, goes through the CPU. In
between, the most important functionality of descrambling is performed by a
descrambler embedded inside the ICAM part of the chipset. In some variants of
STBs, a descrambler can be a part of a decoder, or it can exist independently
Between Demod and Demux. The descrambler takes care of decrypting the
encrypted transport stream using the control word technique. Generally, these
descramblers and control word algorithms are closely-guarded secrets with CA
solution providers to prevent hackers from decrypting the signal. These are
developed in conjunction with chipset vendors in a very secured environment.
An EMM carries a list of Pay TV services which the owner of that STB is entitled
to view and also the date up to which he is entitled to receive them.
The ECM on the other hand carries a data element called control word (CW),
which is used by the descrambler in the STB to descramble the picture and
make it intelligible again. Both these messages are carried in the TS in an
‘encrypted’ form.
Since we may not want to give our content away for free, we need some way of
encrypting our services. This is handled by the conditional access (CA) system.
The algorithm that is used for this is proprietary to each Vendor. In a DVB
system, scrambling can work at either the level of the entire transport stream or
on the level of individual elementary streams. In the case of scrambled
elementary streams, not all of the data is actually scrambled – the packet
headers are left unscrambled so that decoders can work out their contents and
handle them correctly. In the case of transport stream scrambling, only the
headers of the transport packets are left unencrypted – everything else is
scrambled.
In the PMT, find the ECM PID for Program 1. The PMT shows the ECM to be in
packets with PID=0x0150. Locate packets with PID=0x0150 and extract the
ECM for Program 1. Extract the video for Program 1 from packets with
PID=0x0131. If the user has selected the German sound track, locate and extract
the audio track from packets with PID=0x0132. If the user has requested the
English sound track, locate and extract the audio from packets on PID=0x0133.
Using the ECM on PID=0x0150, descramble the video and audio for Program 1.
Assemble the video and audio into PESs. Use the DTS and PTS in the header of
each PES packet to determine when to decode and present the packet’s
contents to the viewer.
MPEG-2
What the MPEG-2 standard does not regulate is the handling of multiple
transport streams simultaneously.
There are two main types of MPEG video compression, spatial encoding and
temporal encoding. Spatial Encoding eliminates redundancy between adjacent
pixels in a video frame. It also makes use of the eye’s inability to detect certain
visual degradations including noise in a “busy” picture area.
Quantization
Weighting
Scanning
Entropy coding
Discrete Cosine Transform (DCT) divides a picture into blocks of 8×8 pixels then
transforms the pixel intensities into a series of frequency-based values, or
coefficients. Because of spatial redundancy, many of the coefficients end up with
zero or near-zero values. These can be dropped from the series of coefficients
so the video frame is expressed in as few bits as possible.
Following DCT, the video frame is quantized, meaning that coefficients are
reorganized in order of visual importance. After quantization, the weighting
process strategically places degradation, or noise, into more detailed or complex
picture areas where the viewer is least likely to notice it. The DCT coefficients
are then scanned such that the most significant coefficients are sent first,
followed by less significant coefficients and finally an indication in the code that
the remaining coefficients are all zero. The final step in spatial encoding is
entropy coding which resizes coefficients based on the number of times they
occur. Frequently repeated coefficients are expressed in the fewest number of
bits, thus greatly decreasing the total bandwidth needed to transmit the
coefficients.
Temporal encoding-
Temporal Encoding eliminates redundancy between sequential frames in the
video frame. Temporal coding takes advantage of the similarities between
sequential frames and encodes only the differences from one frame to the next.
This is accomplished through two types of temporal encoding: inter-frame
prediction and motion prediction. Inter-frame prediction takes advantage of the
similarities between sequential frames by encoding a complete reference frame
only periodically, and then using that frame to predict the preceding and
following frames. The reference frame is called an Intra-coded frame, or I-frame.
I-frames are used as a reference to predict P-frames and B-frames.
This means that instead of transmitting all the DCT coefficients for a P-frame,
the encoder transmits only those coefficients that differ from the preceding I-
frame or P-frame. At the decoder, P-frames are re-created using I- or P-frame as
a reference and applying the differentials. Bidirectional predicted frames, or B-
frames, are predicted in the same fashion from either preceding or subsequent I-
or P-frames.
Using only one I-frame as a basis for creating all the other frames in a video
stream would leave the stream extremely vulnerable to error, since an error in
the I-frame would propagate throughout the entire sequence. For this reason,
frames are divided into Groups of Pictures (GOPs), usually 12-15 frames long.
Each GOP begins with an I-frame, providing for rapid error correction when an I-
frame begins corrupted.
The system layer specifies the structure of the transport stream, the transmission
mechanism for MPEG-2 compressed data. Among other things, this structure
provides for rapid synchronization and error correction at the decoder. The
system layer also defines Program Specific Information (PSI) tables. These act
as a table of contents, allowing the decoder to quickly sort and access
information in the transport stream.
Format of a TS packet
The header has the following fields: • The header starts with a well-known
Synchronisation Byte (8 bits). This has the bit pattern 0x47 (0100 0111). • A set
of three fag bits are used to indicate how the payload should be processed. 1.
The first flag indicates a transport error. 2. The second fag indicates the start of a
payload (payload unit start indicator) 3. The third fag indicates transport priority
bit. • The fags are followed by a 13 bit Packet Identifer (PID). This is used to
uniquely identify the stream to which the packet belongs (e.g. PES packets
corresponding to an ES) generated by the multiplexer. The PID allows the
receiver to differentiate the stream to which each received packet belongs.
Some PID values are predefined and are used to indicate various streams of
control information. A packet with an unknown PID, or one with a PID which is
not required by the receiver, is silently discarded. The particula PID value of
0x1FFF is reserved to indicate that the packet is a null packet (and is to be
ignored by the receiver).
If the information carried in the PES header is corrupted, the entire PES packet
will be lost. The key features of a Packet Header are as follows: Sync Byte sets
the start of a TS packet and allows transmission synchronization. Transport
Error indicator indicates the packet is in error. Packet Identifier (PID) enables the
decoder to sort through the packets in a transport stream to reconstruct
programmes. Program Clock Reference (PCR) provides 27MHz clock recovery
information.
During the encoding process, the packetized elementary streams are packetized
again and the data from the stream is stored in transport packets. Each
transport packet has a length of 188 bytes, and PES has variable length
Header. which is much smaller than a PES packet and so a single PES packet
will be split across several transport packets. The packet size was initially
chosen to simplify mapping of MPEG-2 packets over ATM (Asynchronous
Transfer Mode), which uses cells with a payload of 47 bytes (47×4=188). Like
the PES packet, each transport packet also contains a header and a payload.
This extra level of packetization allows the stream to support much more
powerful error correcting techniques.
PES packets are used to provide a way of multiplexing several streams into one
bigger stream and are more concerned with identifying the type of data
contained in the packet and the time and which it should be decoded and
displayed. Transport packets on the other hand are almost purely concerned
with providing error correction. Once the audio or video stream has been divided
into transport packets, it is multiplexed, or merged with similarly packetized
content for other services. A multiplex composed of one or more services is
called a Transport Stream.
PSI TABLE
PMT-
Each Program Map Table (PMT) literally maps out a specific program, listing the
PID values for the packets containing the program’s video, audio and data
components. With this information, the decoder can easily locate, decode and
display the program’s contents. The PMT also indicates the PID value for a
program’s Entitlement Control Message (ECM). The ECM supplies the decoder
with the keys necessary to descramble the audio and video for a program.
The Event Information Table (EIT) defines all the events in the network,
including their description, start time and duration. According to MPEG an event
is a collection of elementary streams with a common time base set to start and
end at the same time. We often refer to events as “TV programs”. Three different
types of EITs can be transmitted simultaneously: the EIT Present, the EIT
Following and the EIT Schedule. The EIT Present describes the events currently
being broadcast on the transport stream being accessed by the viewer. The EIT
Following provides information about the next events to be broadcast on the
same transport stream.