Top Banner
IBM T.J. Watson Research Center Pravin Bhagwat, Richard Han, Richard LaMaire, Todd Mummert, Veronique Perret, Jim Rubas Mobile Networking Group Chung-Sheng Li, Rakesh Mohan, John R. Smith Image Information Systems Group Contact: Rick Han ([email protected]) Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web Browsing 1
31

Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

Sep 12, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Pravin Bhagwat, Richard Han, Richard LaMaire, Todd Mummert, Veronique Perret, Jim Rubas

Mobile Networking Group

Chung-Sheng Li, Rakesh Mohan, John R. SmithImage Information Systems Group

Contact: Rick Han ([email protected])

Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

Browsing

1

Page 2: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Outline

Architecture Analysis: when and when not to transcode

Case I: Store-and-forward Image size prediction Image delay prediction Bandwidth estimation

Case II: Streaming Practical rules

GIF/JPEG Other transcoding proxies Summary

2

Page 3: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Transcoding

Proxy

Server

Clients

CDPD

ISDN

Cellular

Wirelinemodem

Wireless LANHigh Bandwidth

Low Bandwidth

Transcoding Proxy Environment

3

Page 4: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

0 100 200 300 400

Bottleneck Link Speed (Kb/s)

-20

0

20

40

60

80

100

Res

pons

e T

ime

Red

uctio

n % Image Size = 24Kbytes

transcoding threshold

A transcoder1. converts formats => tailoring of data to multiple devices (e.g. Palm PDA)

2. permits compressionReduced response time via compression over low-bandwidth links.Cost reduction via compression over tariffed links.

Example parameters: "AnyImage" library, 200 MHz Pentium Pro, Windows NT, JPEG quality = 5.

Reasons to Transcode

Image size = 24 KB

4

Page 5: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Transcoding Proxy Architecture

HTTP

Internet InternetTranscodingHTTP Proxy

WebServer

WebBrowser

ContentAnalysis

Adaptive Transcoding Policies: When and how

much to transcode

TextModification

Decode CompressImages

TextModified

Text/HTML

Transcoded Image

Client/Device Capabilities

Client-to-Proxy Bandwidth

User PreferencesProxy-to-Server

Bandwidth

Transformation Modules

5

Page 6: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Adapting to Dynamic User Input

In low-bandwidth environments, let the user dynamically change the tradeoff between image quality and download time.Can turn color on/offCan turn automatic adaptation on/off

Webserver

CDPD

modem

ISDN

Auto

Faster DownloadMore Distillation

Slower DownloadLess Distillation

browser

IBM has a great set of mobile

products.

Proxy

Image transcoders

Backbone

6

Page 7: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Store-and-Forward Image Transcoding

tno proxy = S/min(Bpc, Bsp) + Dprop+queue

tproxy = S/Bsp + Dp(image) + Sp(image)/Bpc + Dprop+queue

S/F transcoding output transmission

delay delay delay

Image Transcoding

Proxy

Web client

Image size S

Bandwidth Bsp

Image size Sp(image)

Bandwidth Bpc

Transcoding Delay Dp(image)

Web server

Definition: A store-and-forward image transcoder must wait to transcode until the whole image is received and must wait to transmit until transcoding is completed.

7

Page 8: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

To Transcode or Not To Transcode

Only transcode when tproxy < tno proxy : S/Bsp + Dp(image) + Sp(image)/Bpc < S/min(Bpc, Bsp)

Case I: Bsp < Bpc (server-proxy link is bottleneck) => Never transcode when Internet backbone is the bottleneck!

Case II: Bpc < Bsp (proxy-client link is bottleneck) => Only transcode when

Dp(image) + Sp(image)/Bpc < S*(1/Bsp - 1/Bpc)

8

Page 9: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Predicting the Output Image Size

Sp(image) depends upon image content, image dimensions, image input size, transcoding parameters, compression algorithm

prediction occurs before transcoding => get info fromimage headersprobabilistic distributions (image content)

9

Page 10: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Sample characteristics:Obtained by visiting top 100 web sites.1074 GIFs (ave. of 2724 bytes), 123 JPEGs (ave. of 4697 bytes).

Platform: 200 MHz Pentium Pro proxy running Windows NT."Anymain" image library.

Web ServerClientProxy

image size S image size Sp(image)

10

Page 11: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Sp=f(input bytes), GIF-to-JPEG, q=5, ρ=0.54

Web ServerClientProxy

image size = S image size = Sp(image)

Sp=f(input pixels), GIF-to-JPEG, q=5, ρ=0.90

Predicting the Output Image Size

11

Page 12: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Sp=f(input pixels), JPEG-to-JPEG, q=5, ρ=0.94

Web ServerClientProxy

image size = S image size = Sp(image)

Sp=f(input pixels), JPEG-to-JPEG, q=50, ρ=0.92

Predicting the Output Image Size

12

Page 13: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Predicting the Image Transcoding Delay

Dp(image) = Dimage transformations + DCPU

Dimage transformations depends on input size, image dimensions, image content, transcoding parameters, decompression & compression algorithms, implementation efficiency of image library

use image headers and statistical analysis to predict the image processing delay

DCPU depends on CPU bandwidth/other processes/threads

13

Page 14: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Web ServerClientProxy

image size = S image size = Sp(image)

Dp(image)

Dp=f(input bytes), GIF-to-JPEG, q=5, ρ=0.65

Predicting the Image Transcoding Delay

Dp=f(input pixels), GIF-to-JPEG, q=5, ρ=0.82

14

Page 15: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Web ServerClientProxy

image size = S image size = Sp(image)

Dp(image)

Dp=f(input pixels), JPEG-to-JPEG, q=50, ρ=0.98

Predicting the Image Transcoding Delay

Dp=f(input pixels), JPEG-to-JPEG, q=5, ρ=0.98

15

Page 16: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Bandwidth Estimation

NetDyn: passive network monitoring

Client-proxy link bandwidth estimation (long-lived)

Proxy-server link bandwidth estimation (transient)

Querying for SPAND-like statistics

Web Server 1

Web Server 2

Proxy Client

SPAND

16

Page 17: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Streamed Image Transcoding

Definition: A streamed image transcoder can begin writing out transcoded image data before having fully read in an image.

R1 = image rate into input bufferR2 = image rate at which streaming transcoder empties input bufferR3 = transcoded image rate into link bufferR4 = image transmission rate out of link buffer

Web server

Streaming Transcoder

Link Buffer

Web Client

Input Buffer

Transcoding Proxy

R1 R3R2 R4

17

Page 18: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

To Transcode or Not To Transcode Redux

Condition I: Don't overflow the input buffer R2 > R1 => S/Dp(image) > Bsp => Dp(image) < S/Bsp

Condition II: Don't overflow the output link's buffer R4 > R3, and image rate @ R3 = image rate @ R1

=> Bpc > Sp(image)/[S/Bsp] => c > Bsp/Bpc , compression ratio c = S/Sp(image)

Web server

Streaming Transcoder

Link Buffer

Web Client

Input Buffer

Transcoding Proxy

R1 R3R2 R4

18

Page 19: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Streamed Image Transcoding (cont.)

Only transcode when Conditions I and II hold: (I) Dp(image) < S/Bsp

(II) c > Bsp/Bpc

If Bsp < Bpc (server-proxy link is bottleneck)=> Condition II always satisfied. Only have to test Condition I.

If Bpc < Bsp (proxy-client link is bottleneck)=> Both Conditions I and II must be evaluated.

19

Page 20: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Web Browser

Web Browser

Apache Transcoding

Proxy

RASIGN

Modem Connection

Wireless Connection

HTTP HTTP

Palm PDALaptop

Web server

Web server

Pravin Bhagwat, Richard Han, Richard LaMaire, Todd Mummert, Veronique Perret, Jim Rubas

Auto

Faster DownloadMore Distillation

Slower DownloadLess Distillation

Reality: Transcoding Proxy Implementation

20

Page 21: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Current Store-and-Forward Transcoding Policies

if to laptopif (input size>1000 bytes)

if input is GIFif well-compressed GIF

GIF->GIF as f(user pref.)else

GIF->JPEG as f(user pref.)else

JPEG->JPEG as f(user pref.)if (output > input size)

send original imageelse

send transcoded imageelse /*to Palm*/

GIF/JPEG->Palm as f(user pref.)

* adapts to user preferences and client device

* adapts to network bandwidth in a static sense

* currently does not predict image delay or output size

Properties

21

Page 22: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Why GIF Is Well-Suited to Compressing "Graphics"

GIF based on LZW:Build dictionary by scanning pixel rowsadd a new word = matched word + 1 character/pixelsend offsets into dictionary

When there are few colors, you get long runs of the same color/pattern, and GIF compresses well.

When there are many colors, there are few long patterns, so GIF's don't compress as well.

22

Page 23: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Why JPEG Is Well-Suited to Compressing a Natural Image

JPEG has 3 stages:

DCT -> quantization -> lossless (RL + Huffman or arithmetic)

DCT concentrates info in low frequency coefficients, so quantization tends to remove high-frequency coefficients

Natural images often consist of mostly low-frequency/variation, or unimportant high-frequency background, so quantization doesn't hurt quality, and achieves high compression

Graphical images have much high-frequency information, so JPEG hurtstheir reconstructed quality.

23

Page 24: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Original: 20,796 bytes

Quality factor = 35: 6,993 bytes33.6% of original

Quality factor = 5: 2525 bytes12.1% of original

Grayscale andQuality factor = 5: 1,886 bytes

9.1% of original

JPEG Image Quality Reduction Example

24

Page 25: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Rationale for Transcoding Policies

Static evaluation of store-and-forward inequality:S/Bsp + Dp(image) + Sp(image)/Bpc < S/min(Bpc, Bsp)

fix Bsp=1 Mb/s, Bpc=50 kb/s, Dp=40 ms+∆, Sp=αS => S>(263+∆')/(1-α) => ~800 byte lower limit

(α=0.5)

if to laptopif (input size>1000 bytes)

if input is GIFif well-compressed GIF

GIF->GIF as f(user pref.)else

GIF->JPEG as f(user pref.)else

JPEG->JPEG as f(user pref.)if (output > input size)

send original imageelse

send transcoded imageelse /*to Palm*/

GIF/JPEG->Palm as f(user pref.)

25

Page 26: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Rationale for Transcoding Policies

GIF->GIF: If an image is already well-compressed in GIF format, e.g. graphics, then converting to JPEG would likely expand the image and reduce quality. bpp = S/(H x W); if (bpp<0.1) ...

GIF->JPEG: most input GIF's

JPEG->JPEG: all input JPEG's

JPEG->GIF. A typical JPEG will have many colors and subtle shadings => GIF likely expands image.

if to laptopif (input size>1000 bytes)

if input is GIFif well-compressed GIF

GIF->GIF as f(user pref.)else

GIF->JPEG as f(user pref.)else

JPEG->JPEG as f(user pref.)if (output > input size)

send original imageelse

send transcoded imageelse /*to Palm*/

GIF/JPEG->Palm as f(user pref.)

26

Page 27: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Rationale for Transcoding Policies

GIF->GIF: If an image is already well-compressed in GIF format, e.g. graphics, then converting to JPEG would likely expand the image and reduce quality. bpp = S/(H x W); if (bpp<0.1) ...

GIF->JPEG: most input GIF's

JPEG->JPEG: all input JPEG's

JPEG->GIF. A typical JPEG will have many colors and subtle shadings => GIF likely expands image.

if to laptopif (input size>1000 bytes)

if input is GIFif well-compressed GIF

GIF->GIF as f(user pref.)else

GIF->JPEG as f(user pref.)else

JPEG->JPEG as f(user pref.)if (output > input size)

send original imageelse

send transcoded imageelse /*to Palm*/

GIF/JPEG->Palm as f(user pref.)

27

Page 28: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Rationale for Transcoding Policies

GIF->GIF: If an image is already well-compressed in GIF format, e.g. graphics, then converting to JPEG would likely expand the image and reduce quality. bpp = S/(H x W); if (bpp<0.1) ...

GIF->JPEG: most input GIF's

JPEG->JPEG: all input JPEG's

JPEG->GIF. A typical JPEG will have many colors and subtle shadings => GIF likely expands image unless we can find fast colormap reduction.

if to laptopif (input size>1000 bytes)

if input is GIFif well-compressed GIF

GIF->GIF as f(user pref.)else

GIF->JPEG as f(user pref.)else

JPEG->JPEG as f(user pref.)if (output > input size)

send original imageelse

send transcoded imageelse /*to Palm*/

GIF/JPEG->Palm as f(user pref.)

28

Page 29: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Other Transcoding Proxies

UCB/ProxiNet - real-time transcoding proxy for small clients (Pythia supported PC's/laptops)

Spyglass' Prism - real-time transcoding proxy for small clients (text and images)

AvantGo 2.0 - hot-synch proxy for small devices, possibly off-line transcoding

Intel's QuickWeb - defunct, real-time transcoding proxy for PC's/laptops, light transcoding

3COM's "Web clipping" proxy for Palm VII (no images?)

29

Page 30: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Other Research Issues

Integrating caching proxies with transcoding

Split browser paradigm

Scalability/Load-Balancing

Security

30

Page 31: Dynamic Adaptation in an Image Transcoding Proxy For Mobile Web

IBM T.J. Watson Research Center

Summary

Derived theoretical conditions determining when proxies should adaptively transcode images

Store-and-forwardStreaming

Presented a set of practical transcoding policies that are statically adaptive

Paper: "Dynamic Adaptation In An Image Transcoding Proxy For Mobile Web Browsing", December 1998, IEEE Personal Communications Magazine. Contact: [email protected].

31