ky thuat dpcm

Upload: zjnka141

Post on 07-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/20/2019 Ky thuat DPCM

    1/18

    DPCM - Differential pulse code modulation

    What is DPCM?

    Differential pulse code modulation (DPCM) is procedure of converting analog to digital signal inwhich analog signal is sampled and then difference between actual sample value and its predicted

    value (predicted value is based on previous sample or samples) is quantized and then encodedforming digital value.

    DPCM code words represent differences between samples unlike PCM where code words

    represented a sample value.

    asic concept of DPCM ! coding a difference" is based on the fact that most source signals shows

    significant correlation between successive samples so encoding uses redundanc# in sample valueswhich implies lower bit rate.

    $ealization of basic concept (described above) is based on technique in which we have to predict

    current sample value based upon previous samples (or sample) and we have to encode the

    difference between actual value of sample and predicted value (difference between samples can be interpreted as prediction error).

    ecause its necessar# to predict sample value DPCM is form of predictive coding.

    DPCM compression depends on prediction technique" well!conducted prediction techniques leadsto good compression rates" in other cases DPCM could mean e%pansion comparing to regular

    PCM encoding.

    Fig 1. DPCM encoder (transmitter)

     

  • 8/20/2019 Ky thuat DPCM

    2/18

    Fig 2. DPCM coder (receier)

    Description of DPCM transmitter - receier!

    ! sampled values of input signal

    ! prediction error" difference between actual and predicted value

    ! quantized prediction error 

    ! predicted value! reconstructed value of sampled signal

    ! value after DPCM coding (input value for DPCM decoding)

    ! predictor coefficients (weighting factors)

    is current sample and is predicted value" predicted value is formed using prediction factors

    and previous samples" usuall# linear prediction is used" so predicted value can be given as a

    weighed linear combination of p  previous samples using " weighting factors&

    Difference signal is then&

    'e choose weighting factors in a order to minimize some function of error between and

    (like mean!squared) this leads us to minimization of quantization noise (better signal!to!noise

    ratio).

    DPCM compression of images and ideo signalsDPCM conducted on signals with correlation between successive samples leads to good

    compression ratios.

    mages and video signals are e%amples of signal which have above mentioned correlation" inimages this means that there are correlation between neighboring pi%els" in video signals

    correlation are between same pi%els in consecutive frames and inside frames (which is same as

    correlation inside image).

  • 8/20/2019 Ky thuat DPCM

    3/18

    ormall# written" DPCM compression method can be conducted for intra!frame coding and inter!

    frame coding" intra!frame coding e%ploits spatial redundanc# and inter!frame coding e%ploitstemporal redundanc#.

    n the intra!frame coding difference is formed between neghboring pi%els of the same frame"

    while in the inter!frame coding it is formed between value of the same value in two consecutive

    frames. n both coding intra! and inter! frame the value of target pi%el is predicted using the previousl#!coded neighboring pi%els.

    f we appl# facts mentioned in DPCM description and ig *. and ig +. on image compression

    is current pi%el value and is formed using p  pi%els prior to current pi%el. is differential

    image formed as difference betewen actual pi%el and previos pi%els (as described above for an#signal).

    t is important to point out that in forming a prediction reciever i.e decoder has acces onl# to

    reconstructed pi%el values " since the process of quantization of differential image introduces

    error" reconstructed values" as e%peceted diverges from from original values. dentical predictionsof both receiver and transmitter are assured b# transmitter configuration in which transmitter

     bases its prediction on the same values as receiver i.e predicted values. acts that was mentioned

    in this paragraph are applicable for signals in general not ,ust image and video signals.

    Design of DPCM s#stem means optimizing the predictor and quantizer components" because thequantizer is included in prediction loop there is comple% dependanc# between the prediction error 

    and quantizaton error so ,oint optimization should be performed to assure optimal results. ut"

    modeling such optimization is ver# comple% so optimization of those two components are usuall#optimized separatel#. t has been shown that under the mean!squared error optimization criterion"

    apart constructions of quantizatior and predictor are good appro%imations of ,oint optimization.

    -ame as previous paragraph" facts in these paragraph are also applicable for signals in general.

    Delta modulation

    Delta modulation (DM )is a subclass of differential pulse code modulation" can be viewed as

    simplified variant of DPCM" in which *!bit quantizer is used with fi%ed first order predictor it

    was developed for voice telephon# applications.Principle of DM & DM output is if waveform fall in value" * represents rise in value" each bit

    indicates direction in which signal is changing (not how much)" i.e. DM codes the direction of

    differences in signal amplitude instead of value of difference (DPCM).

    asic concept of delta modualation can be e%plained on DM block diagram DM shown in ig /.

  • 8/20/2019 Ky thuat DPCM

    4/18

    ig /. DM encoder 

    nput signal is compared with integrated output and delta signal (difference between input

    signal and pulse signal) is brought to quantizer. 0uantizer generates output according to

    difference signal if difference signal is positive quantizer generates positive impuls" and ifdifference is negative quantizer generates negative signal. -o" output signal contains bipolar pulses.

    1s it can be noticed in DM there is feedback b# which output signal is brought to integrator

    which integrates the bipolar pulses forming a pulse signal which is being compared with input

    value. Comparisson is conducted between signal value in n-1  time interval and input signal

    value in n  time interval" result is delta signal . Delta signal can be positive or negative and

    then (as described above) output signal is formed. 2utput signal contains information about signof signal change for one level comparing to previous time interval.

    mportant chacterstic of DM is that waveform that is delta modulated needs oversampling i.e.

    signal must be sampled faster than necessar#" sampling rate for DM is much higher than 3#quistrate (twice bandwidth). ut" at an# sampling rate two t#pes of distortion limits performance od

    DM encoder.

    4hese distortions are& slope overload distortion and granular noise.-lope overload distorsion ! caused b# use of step size delta which is too small to follow portions

    of waveform that have a steep slope.

    Can be reduced b# increasing the step size.

    5ranular noise ! caused b# too large step size in signal parts with small slope. t can be reduced b# decreasing the step size.

    "n illustration of DPCM#s adantages oer PCM

    1 t#pical e%ample of a signal good for DPCM is a line in a continuous!tone (photographic) image

    which mostl# contains smooth tone transitions. 1nother e%ample would be an audio signal with alow!biased frequenc# spectrum.

    or illustration" we present two histograms made from the same picture which was coded in two

    wa#s. 4he histograms show the PCM and DPCM sample frequencies" respectivel#.

  • 8/20/2019 Ky thuat DPCM

    5/18

    2n the first histogram(ig 6.)" a large number of samples has a significant frequenc# and we

    cannot pick onl# a few of them which would be assigned shorter code words to achievecompression. 2n the second histogram(ig 7.)" practicall# all the samples are between !+ and

    8+" so we can assign short code words to them and achieve a solid compression rate.

    ig 6. 9istogram of PCM sampled image

    ig 7. 9istogram of DPCM sampled image

    DPCM - practical uses

    n practice" DPCM is usuall# used with loss# compression techniques" like coarser quantization

    of differences can be used" which leads to shorter code words. 4his is used in :P;5 and inadaptive DPCM (1DPCM)" a common audio compression method. 1DPCM can be watched as

    superset of DPCM.

    n 1DPCM quantization step size adapts to the current rate of change in the waveform which is

     being compressed.Different 1DPCM implementations have been studied" one more popular is M1 1DPCM" this

    1DPCM implementation is based on the algorithm proposed b# $nteractive Multimedia

    "ssociation. M1 1DPCM standard specifies compression of PCM from *< down to 6 bits per

  • 8/20/2019 Ky thuat DPCM

    6/18

    sample.

    5ood side of 1DPCM method is minimal CP= load" but have significant quantization noise andonl# mediocore compression rates can be achieved(6&*).

    %$&'

      >er# useful link with detailed information about DPCM and 1DPCM   More informations about 1DPCM   Delta Modulation ! man# e%amples  M1 1DPCM compression algorithm ! ver# comprehensive

    Differential Pulse Code Modulation (DPCM)

    n a loss# DPCM scheme" m pi%els within a causal neighborhood of the current pi%el are used to

    make a linear prediction (estimate) of the pi%el?s value. More specificall#" referring to the rasterscan configuration in ig.@.*" the m pi%els prior to the current pi%el %m (shown in the figures as 1"

    " C" etc.) are used to form a linear prediction denoted b# " where

    (A.*)

    and the ?s are the predictor coefficients (weighting factors). 4o reduce the s#stem comple%it#"

    the prediction is usuall# rounded to the nearest integer" although it ma# be preserved in floating

     point representation. t is also necessar# to clip the prediction to range B"+n

    !* for an n!bit image.4he differential (error) image" em" is constructed as the difference between the prediction and theactual value i.e."

      (A.+)

    Eossless Prediction Coding " the differential image t#picall# has a greatl# reduced variance

    compared to the original image" is significantl# less correlated" and has a stable histogram wellappro%imated b# a Eaplacian (double!sided e%ponential) distrbution. 4he difference between

    loss# and lossless DPCM lies in the handing of the differential image. n order to lower the bit

    rate" the differential image in loss# DPCM is quantized prior to encoding and transmission. 1

     block diagram for a basic DPCM transmitter and receiver s#stem shown in

    ig. A.* " where represents the quantized differential image.

     

    http://www.cmlab.csie.ntu.edu.tw/cml/dsp/training/coding/dpcm/http://xfactor.wpi.edu/Works/MQP/ephone/2_3.htmlhttp://www.cs.tut.fi/~rosti/1-bit/http://xfactor.wpi.edu/Works/MQP/ephone/2_3_1.htmlhttp://www.cmlab.csie.ntu.edu.tw/cml/dsp/training/coding/dpcm/http://xfactor.wpi.edu/Works/MQP/ephone/2_3.htmlhttp://www.cs.tut.fi/~rosti/1-bit/http://xfactor.wpi.edu/Works/MQP/ephone/2_3_1.html

  • 8/20/2019 Ky thuat DPCM

    7/18

    t is important to realize that in forming a prediction" the receiver onl# has access to the

    reconstructed pi%el values. -ince the quantization of the differential image introduces error" thereconstructed values t#picall# differ from the original values. 4o assure that identical predictions

    are formed at both the receiver and the transmitter" the transmitter also bases its prediction on the

    reconstructed values. 4his is accomplished b# containing the quantizer within the prediction loop

    as shown in the transmitter diagram of ig.A.*. n essence" each DPCM transmitter includes thereceiver within its structure.

     

    4he design of a DPCM s#stem consists of optimizing the predictor and the quantizer components.

    ecause the inclusion of the quantizer in the prediction loop results in a comple% dependenc# between the prediction error and the quantization error" a ,oint optimization should ideall# be

     performed. 9owever" to avoid the comple%it# of modeling such interactions" the two components

    are usuall# optimized separatedl#. t has been shown that under the mean!squared erroroptimization criterion" independent optimizations of the predictor and the quantizer are good

    appro%imations to the ,ointl# optimal solution.

     

    $eference&

    Digit mage Compression 4echniques

    Ma,id $abbani and Paul '.:ones

     

    Prediction optimization

    4he set of predictor coefficients ma# be fi%ed for all images (global prediction)" or ma# var#

    from image to image (local prediction)" or ma# be even var# within an image (adaptive prediction). f onl# pi%els from the current scan line are used in forming the prediction" the

     predictor is referred to as one!dimensional (*!D). f pi%els from the previous lines are included"

    the predictor is two!dimensional (+!D). 0uantitativel#" +!D predictior results in -3$improvements of around / d as compared to *!D prediction" but the sub,ective qualit#

    improvement is even more substantial than this number would suggest. 4his is mainl# due to theelimination of the ,aggedness around nonhorizontal edges. 4he disadvantage of +!D prediction is

    that it requires the buffering of the previous line. 4he number of pi%els emplo#ed in the prediction is called the order  of the predictor. n general" a higher order predictor outperforms a

    lower order one" but studies performed on television images and radiographs have demonstrated

    that there is onl# a marginal gain be#ond a third!order predictor.

  • 8/20/2019 Ky thuat DPCM

    8/18

    'e now address the problem of finding the optimum local (single image) predictor coefficients.

    1 widel# used criterion is the minimization of the mean!squared prediction error. =nder this

    criterion" the best linear estimate of xm is the value that minimizes the e%pected value of the

    squared prediction error i." e.." it minimizes

      (A./) 

    4his is realized b# making the prediction error orthogonal to all available data" and the m optimal

    coefficients can thus be found b# solving the following set of linear equations&

      i F "*"...m!*.  (A.6) 

    ;%panding this set of equations result in terms involving the image auto!correlation values.

    1ssuming that that the image is +!D stationar# random field" the auto!correlation value $ k,l  isdefined as

      (A.7) 

    where %(i",) is the pi%el value at locaiton (i",).4he need to compute auto!correlation values foreach image makes local prediction impractical for man# real time applications. urthermore" the

     performance gain achieved b# a local predictor over a global predictor (one that is fi%ed for all

    images) is t#picall# onl# a few percent. 4hus" global prediction is a more attractive choice for

    most applications.

     

    4he selection of a robust set of global predictor coefficients for t#pical imager# can be

    approached in a number of wa#s. 2ne method is to assume a simple image model and then solve

    the corresponding set of equations given in (A.6). 1 Markov model with a separable auto!correlation function has been widel# used for t#pical imager#.

    (A.

  • 8/20/2019 Ky thuat DPCM

    9/18

    coefficients " " " and " corresponding to the neighboring pi%els 1" " C" and D in

    ig@.*. 1lso assume that the image mean has been subtracted from ever# pi%el value" so that

    F.

     

    F " F ! " F " F " (A.@) 

    and the resulting predictor is

     

    (A.G)

    t is interesting to note that this optimal fourth!order predictior has onl# three nonzero

    coefficients rather than four. 4his is because pi%el D contributes no additional information over

    that alread# provided b# pi%els 1 through C for the particular image model given in ;q. (A.

  • 8/20/2019 Ky thuat DPCM

    10/18

    F .A@1  *st!order" *!D predictor"  (A.**)

    F .718.7C  +nd!order" +!D predictor" (A.*+)

    F .A1!.G*8.AC  /rd!order" +!D predictor" (A.*/)

    F .@71!.78.@7C /rd!order" +!D predictor"

      (A.*6)F 1!8C  /rd!prder" +!D predictor" (A.*7)

     

    $eference&

    Digit mage Compression 4echniques

    Ma,id $abbani and Paul '.:ones

     

    0uantizer optimization

    1 substantial portion of the compression achieved b# a loss# DPCM scheme is due to the

    quantization of the differential image. 0uantizer design ma# be based on either statistical orvisual criteria. -everal approaches to designing quantizers based on visual criteria have been

    suggested " but a debate continues on the best criterion to use" and ,ustifiabl# so" considering the

    comple%ities of the 9>-. n the discussion that follows" we restrict ourselves to the design ofquantizers that are optimized on a statistical basis.

     

    1 quantizer is essentiall# a staircase function that maps man# input values (or even a continuum)

    into a smaller" finite number of output levels. Eet e be a real scalar random variable with a

     probabilit# densit# function pe(e) e.g." e could represent the differential image and pe(e) could

    represent its histogram. 1 quantizer maps the variable e into a discrete variable that belongs to a finite set Hr i" i F "..."3!*Iof real numbers referred to as reconstruction levels. 4he

    range of values of e that map to a particular are defined b# a set of points Hdi" i F "..."3I" referred to as decision levels. 4he quantization rule states that if e lies in the interval(di"di8*)" it is mapped (quantized) to r i" which also lies in the same interval. 4he quantizer design

     problem is to determine the optimum decision and reconstruction levels for a given pe(e) and a

    given optimization criterion.

     

  • 8/20/2019 Ky thuat DPCM

    11/18

    Depending on whether the quantizer output levels are encoded using variable!length or fi%ed!

    length codewords" two different t#pes of quantizers are t#picall# used in a DPCM s#stem. orfi%ed!length codewords" the DPCM bit rate is proportional to log+ 3" where 3 is the number of

    quantizer levels. n this case" it is desirable to design a quantizer that minimizes the quantization

    error for a given 3. f the M-; criterion is used" this approach leads to a quantizer known as the

    Elo#d!Ma% quantizer. 4his t#pes of quantizer has nonuniform decision regions. or variable!length codewords" the bit rate is lower bounded b# the entrop# of the quantizer output (instead of

    log+ 3)" which leads to the approach of minimizing the quantization error sub,ect to an entrop#

    constraint. -ince the qunatizer output distribution is usuall# highl# skewed" the use of variable!length coding seems appropriate. or a Eaplacian densit# and M-; distortion" the optimum

    quantizer in this case is uniform i.e." the decision regions all have the same width. or the same

    M-; distortion" a uniform quantizer has more levels than a Elo#d!Ma% quantizer" but it also has alower output entrop#. t has been shown that for Eaplacian densit# and a large number of

    quantizer levels" optimum variable!length coding improves the -3$ b# about 7.< d over fi%ed!

    length coding at the same bit rate

    t is worthwhile to discuss the Elo#d!Ma% quantizer in more detail since it finds use in othertechniques DPCM. ts derivation is based on minimizing the e%pression

      (A.*

  • 8/20/2019 Ky thuat DPCM

    12/18

    ig A.+ shows the optimum Elo#d!Ma% decision and reconstruction levels for a unit!variance

    Eaplacian densit# with 3FG (/!bit quantizer). 1s e%pected" the quantization is fine near zerowhere the signal pdf is large" and becomes coarse for large differences. 4o illustrate t#pical

     performance" the /!bit quantizer (scaled according to the prediction error variance) was applied to

    the E;31 image. 4he results are summarized in 4ableA.*. 4he first column denotes the inde% i of 

    the quantizer output. 4he second column denotes the decision and reconstruction levels for agiven quantizer level. 3ote that the magnitude of the largest reproducible difference value in this

    s#stem is onl# +. Due to the required s#mmetr#" a quantizer with an even number of levels

    cannot reconstruct a difference of zero. 4his t#pe of quantizer is referred to as mid-riserquantizer . t is also possible to design a mid-tread quantizer  that has an odd number of levels and

    can pass zero. f the levels are fi%ed!length coded" the mid!tread quantizer is less efficient

     because of unused codewords. 4he third column shows the probabilities of occurrence of thequantizer outputs" 4he entrop# of the quantizer output levels is +.7+ bitsJpi%el while the local

    9uffman code in the last column of 4able A.* achieves a bit rate of +.7@bitsJpi%el" which is fairl#

    close to the entrop#. 1s noted previousl#" the use of an optimum uniform quantizer with variable!

    length coding would allow for a higher quantit# reconstruction at this same bit rate" orconversel#" a lower bit rate for the same qualit#.

     

    n designing a quantizer for a given application" it is important to understand the t#pes of visual

    distortion introduced b# the quantization process in DPCM" namel#" granular noise" slopeoverload " and edge busyness. 4here are illustrated in ig A./" 5ranular noise is apparent in

    uniform regions and results from the quantizer output fluctuating randoml# between the inner

    levels as it attempts to track small differential signal magnitudes. 4he use of small inner levels ora mid!tread quantizer with zero as an output level ma# help to reduce granular noise. -lope

    overload noise occurs at high contrast edges when the outer levels of the quantizer are not large

    enough to respond quickl# to large differential signals. 1 lag of several pi%els is required for the

    quantizer to tract the differential signal" resulting in a smoothing of the edge. ;dge bus#nessoccurs when a reconstructed edge varies slightl# in its position from one scan line to another due

    to quantizer fluctuations. =nfortunatel#" attempts to reduce one t#pe of degradation usuall#

    enhance other t#pes of noise.

     

    $eference&

    Digit mage Compression 4echniques

    Ma,id $abbani and Paul '.:ones

     

  • 8/20/2019 Ky thuat DPCM

    13/18

    "daptie DPCM

    1 ma,or limitation of the DPCM s#stem consider so far is that the predictor and the quantizer are both fi%ed throughout the image. DPCM schemes can be made adaptive in terms of the predictor

    or the quantizer or both. 1daptive prediction usuall# reduce the prediction error prior toquantization" and thus" for the same bit rate" the reduced d#namic range of the quantizer inputsignal results in less quantization error and better reconstructed image quanlit#. 2n the other

    hand" adaptive quantization aims at reducing the quantization error directl# b# var#ing the

    decision and reconstruction levels according to the local image statistics. 'e now review several

    adaptive DPCM(1DPCM) prediction and quantization schemes to provide more insight into theimplementation of the above concepts.

     

    1daptive prediction

     3onadaptive predictors generall# perform poorl# at edges where abrupt changes in pi%el valuesoccur. 1n adaptive scheme has been proposed to improve the prediction in such regions. 4he

    scheme is based on switching among a set of predictiors based on the most likel# direction of the

    edge. n particular" the prediction is chosen to be one of the previous pi%el values" 1" " C" or D"as in ig@.*. n determining the edge direction" the reconstructed values of the neighboring pi%els

    are used so that the decision is causal. mproved perceived image qualit# and -3$ gains of

    appro%imatel# 6d were reported for this method as compared to a third!order fi%ed predictor.

     

    n another causal technique" the prediction value of a conventional +!d predictor is multiplied b#an adaptive coefficient k to generated a new prediction. 4he value of the coefficient is based on

    the previous quantizer reconstruction level. or e%ample" if the previous reconstruction level has

     been a positive ma%imum" there is a high probabilit# of a slope overload" and thus k is chosen to be greater than one to accommodate the larger positive difference. 'ith this relativel# simple

    adaptive technoque" the slope response in DPCM s#stems using / bitsJpi%el or less can improved.

     

    1daptive quantization

    n the adaptive prediction technique ,ust described" the prediction was scaled based on the

     previous reconstructed level. =sing the same idea" an adaptive quantizer scheme can also be

    developed. n this approach" the qunatizer levels for a given pi%el are found b# scaling the levelsused for the previous pi%el b# some factor. 4his factor depends on the reconstruction level used

    for the previous pi%el" so no overhead information is required. t was reported that

  • 8/20/2019 Ky thuat DPCM

    14/18

     proportionatel# faster step size increases were needed as compared to the step size decrease. t

    was also found that with increasing number of quantizer levels" the performance improvement ofthis approach over a fi%ed quantizer scheme became less pronounced. 4he scheme is particularl#

    effective with one!bit DPCM" also known as delta modulation (DM)

     

    1 more sophisticated approach to adaptive quantization is to make use of the visual masking a

    effects in 9>-. t is well known that the luminance sensitivit# of the 9>- decreases in the picture areas of high!contrast detail. n these areas" large quantization errors can be masked b#

    the 9>-.1 procedure was outlined for designing quantizers with the minimum number of output

    levels" sub,ect to the constraint that the largest magnitude of the quantization error resulting froman arbitrar# input is less than the visibilit# threshold. =sing these t#pes of quantizers" adaptivit#

    can be introduced b# considering the degree of noise masking possible around the current

     pi%el(based on surrounding image detail)and then switching among a number of quantizers. 4hedetail or activit# in a neighborhood around the current pi%el can be defined in a number of

    different wa#s. or e%ample" the weighted average of several vertical and horizontal gradientscan be used. f a noncausal neighborhood is used in determining the activit#" overhead

    information must be transmitted to inform the receiver of the quantizer selection.

     

    n another noncausal method" an estimate of the number of bits required to quantize the

    differential signal is made for each pi%el. 4his estimate is based on the previousl# reconstructed

    differential values and can be tracked b# the receiver. or each pi%el" one bit of overheadinformation is transmitted denoting the validit# of the estimate. or e%ample" a ?? implies that the

    estimated number of bits was sufficient for encoding the differential image and is followed b# the

    information needed to identif# the selected quantizer level. 1 ?*? indicates that more bits arerequired than estimated and is followed b# a ?? for each skipped quantization level until it is

    terminated b# ?*? at the desired quantization level. 4he overhead information" if left

    uncompressed" adds at least * bitJpi%el to the overall bit rate of the s#stem. ortunatel#" the

    entrop# of the overhead signal is small and can be entrop# encoded using adaptive arithmeticcoding techniques.

     

    1 third scheme using noncausal adaptation is based on the observation that the distribution of the

    differential signal em is generall# a function of the neighboring (past and future) pi%el values. 3onadaptive quantizers assume that em has a Eaplacian pdf with a variance equal to the global

    variance of the differential image. 9owever" for a given set of neighboring values" the actual

    distribution of em ma# substantiall# differ from that assumption. or e%ample" the variance of em in flat regions is much smaller than the global variance" whereas the variance in highl# te%tured

    areas ma# be larger than the global value. 1lso" near contours or high!contrast edges" the

    distribution ma# not even be s#mmetric. 1s a result" instead of using a signal quantizer" the

    s#stem switches among a set of quantizers designed to accommodate the var#ing local statistics.n a practical s#stem" to reduce overhead bits and computational comple%it#" the selection of

  • 8/20/2019 Ky thuat DPCM

    15/18

    given quantizer can be made for a block of the image rather than each individual pi%el. 4he

    following steps summarize the action of the encoder&

     

    . Partition each scan line into blocks of k  pi%els.

    . ;ncode the block using each the m available quantizers.

    . Measure the distortion resulting from quantizer.

    . -elect the quantizer with minimum distortion.

    . 4ransmit log+ m bits of overhead information per k!pi%el block 

    to identif# the quantizer to the receiver.

    . 4ransmit the encoded signal for the block.

     

    1 block diagram of the encoder is shown in ig. A.6. t is evident from the above description that

    there are several parameters which need to be selected in the design and implementation of the

    switched quantizer scheme" namel# the length of the image block" the number of quantizers" the

    structure of each individual quantizer" and the distortion measure.

     

    1 larger block size implies a smaller overhead penalt#" but also reduces the advantages gained

    from the adaptivit#. n our e%ample" we found that k F * was a good compromise.

     

    n general" choosing the number of quantizers is a trade!off between improving the reconstructedimage qualit# and keeping the overhead bits at an acceptable level. 'ith a fi%ed!length code" the

    value of m is restricted to a power of two" but with entrop# coders such as an arithmetic coder" m 

    can have an# value. n our e%ample" we used four quantizers and emplo#ed fi%ed!length codes toencode the overhead information.

     

    deall#" for a given m" it is desirable to design the quantizers to that the overall quantization

    distortion is minimizes. Due to the comple%it# of this problem" the quantizer design has usuall#

     been performed in an ad  hoc manner. n some reference" the quantizers are s#mmetric and arescaled version of the Elo#d!Ma% quantizer for a Eaplacian pdf with a variance equal to the global

    variance of the differential image. n some references" it was argued that nons#mmetric

  • 8/20/2019 Ky thuat DPCM

    16/18

    quantizers can encode edges more effectivel#. 4his is particularl# true for small block sizes. 1lso"

    the number of output quantizers levels does not have to be fi%ed and can be allowed to var# fordifferent quantizers. >ar#ing the number of output quantizer levels generall# results in superior

    image qualit#" but it also gives rise to a variable output rate" which ma# not be desirable in certain

    applications. urthermore" in such a case" the selection of the optimum quantizer becomes a

    complicated task as a certain quantizer ma# result in higher distortion but also a lower bit rate. nour e%ample" we used s#mmetric quantizers with eight reconstruction levels" which were all

    scaled version of the global Elo#d!Ma% quantizer.

     

    4he distortion measure used in selection the quantizer for each block should ideall# be based onvisual criteria. mplementing such a measure requires a good knowledge of 9>- and is

    computationall# intensive. 1s a result" simpler distortion measures such as M-; are commonl#

    used. 1n alternative distortion measure is the sum of the absolute error. 4his measure has anadvantage in hardware implementation as the absolute value operation requires less circuitr# than

    the squaring operation. 'e have found that both distortion measures work well in practice for thisapplication.

     

    $eference&

    Digit mage Compression 4echniques

    Ma,id $abbani and Paul '.:ones

     

    DPCM $esults

    4able A.+ summarizes the results obtained from appl#ing nonadaptive and adaptive (switchedquantization) DPCM techniques to the two test images using fi%ed *!D and +!D predictors. n the

    nonadaptive DPCM scheme" Elo#d!Ma% nonuniform quantizers with two" four" or eight output

    levels (corresponding to a bit rate of *." +." or /. bitJpi%el with fi%ed!length coding) wereused to quantize the differential image. 4hese quantizers were optimized for a Eaplacian

    distortion with the same variance as the differential image global variance.

    4he 1DPCM scheme switched among four (mF6) quantizers over a block length of * pi%els

    (k F*). 4he overhead information required to inform the receiver of the quantizer choice wasthus + bitsJ* pi%els F .+ bitJpi%el. 1ll quantizers were scaled versions of the same Elo#d!Ma%

    nonuniform quantizers used in the nonadaptive case. 4he scale factors were .7" *." *.@7" and

    +.7. 'ith the overhead information" the resulting bit rates were *.+" +.+" and /.+ bitsJpi%el.

  • 8/20/2019 Ky thuat DPCM

    17/18

     

    mplementation ssues and Comple%it# of 1DPCM 1lgorithm

    n the following discussion on the 1DPCM computational comple%it#" it is assume that theswitched quantizer encoder is implemented as four independent sequential encoder units i.e." we

    do not take advantage of the common components in the predictor computations or the parallel

    nature of the switched quantizer. 1 parallel implementation of the four quantizers could easil# beimplemented to effectivel# reduce the number of computations.

     

    or each encoder unit" the third!order predictor requires / multiplications and + additions per

     pi%el" and formation of the differential" reconstructed" and distortion signals requires / additions

     per pi%el. ;ach scalar quantizer of rate $ ($F*"+" or / bits) requires $ comparisons per pi%el if a binar# tree structure" i.e." successive appro%imation" is used. 4herefore" the four encoder units

    require a total of

    . *+ multiplications"

    . + additions" and

    . 6$ comparisons

     per pi%el. 'e disregard the additional / comparisons per * pi%el block required to choose the

    minimum distortion quantizer. 4he decoder requires / multiplications and + additions per pi%elfor the predictor and * addition to form the reconstructed value.

     

    4herefore" the decoder requires

    . / multiplications and

    . / additions

     per pi%el. 4he as#mmetr# between the encoder and decoder is obvious for this algorithm.

     

    Memor# requires are minimal for the 1DPCM algorithm. 1t both the encoder and decoder" permanent memor# is required for the predictor coefficients and the quantizer levels" and two line

     buffers are required to store the previous and current reconstructed lines used in the predictor

  • 8/20/2019 Ky thuat DPCM

    18/18

    computations. our block buffers are also required at the encoder for the switched quantizer

    selection.

     

    1s noted in -ection A.*.*" channel errors are propagated in DPCM owing to the use of previousl#reconstructed values in the predictor. 4he errors are t#picall# manifested as *!D or +!D streaks

    (depending on whether the predictor is *!D or +!D)" and the e%tent of the streaks depends on the

    values of the predictor coefficients. 4he effects of an# channel errors can be minimized b#sending the actual values of pi%els at prescribed locations in order to reinitialize the predictor at

     both the transmitter and the receiver.

     

    $eference&

    Digit mage Compression 4echniques

    Ma,id $abbani and Paul '.:ones