datacompression source$coding$orbitrate$ reducon...

24
Data compression, Source coding or Bitrate reduc4on: kodiranje informacije tako da konačan oblik sadrži manje bita od originalnog. Dve vrste kodova: Losy i Lossless (sa gubicima i bez gubitaka)

Upload: hathuan

Post on 01-Jul-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  Data  compression,  Source  coding  or  Bit-­‐rate  reduc4on:  kodiranje  informacije  tako  da  konačan  oblik  sadrži  manje  bita  od  originalnog.  

•  Dve  vrste  kodova:  Losy  i  Lossless  (sa  gubicima  i  bez  gubitaka)    

Page 2: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

Lossless  data  compression  

•  Lossless  kodovi  redukuju  bite  prepoznajući  i  otklanjajući  tzv.  sta4s4čku  redundansu.  (sta4s4cal  redundancy)  

•  U  teoriji  informacija  redundansa  je  razlika  broja  bita  kojima  je  zapisana  informacija  i  broja  bita  koji  opisuju  samu  informaciju.  

•  Količina  “nepotrebnih”  bita  u  zapisu.  

Page 3: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

Run-­‐length  encoding  •  Većina  realnih  zapisa  u  sebi  sadrži  staGsGčku  redundansu.  •  Primer:  deo  površine  slike  je  konstantno  zelene  boje  –  umesto  da  

prenosimo  informaciju:  zeleni  piksel,  zeleni  piksel,  zeleni  piksel,  zeleni  piksel...  Dovoljno  je  zapisaG:  427  zelenih  piksela!  

•  Primer:    beli  i  crni  pikseli  u  tekstu  :  WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW    

•  Primenom  RLE  algoritma  ovaj  niz  se  zapisuje  kao:  12W1B12W3B24W1B14W  

•  Ovo  je  primer  prostog,  tzv.  Run-­‐length  encoding  (RLE)  data  compression  algoritma.  

•  Veoma  primenljiva  tehnika  kod  zapisa  u  kojima  ima  dosta  ponavljanja:  prenos  poruke  faksom,  veći  deo  informacije  je  beli  papir...  Nepovoljan  je  za  kodovanje  fotografija  gde  se  paleta  menja  u  konGnuitetu.  

•  KorisG  se  u  Truevision  TGA,  PackBits,  PCX    i  ILBM    formaGma,  kao  i  ispomoć  u  GIF  i  JPEG  kompresionim  tehnikama.  

Page 4: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

LZ77  i  LZ78  •  Abraham  Lempel  i  Jakob  Ziv,  1977.  i  1978.  godina.  •  Nalaze  se  u  osnovi  GIF  i  DEFLETE  algoritama.  Na  DEFLETE  algoritmu  je  baziran  PNG  kod.  

•  Pripadaju  klasi  tzv.  DicGonary  Coders  tehnika  (postojanje  rečnika).  

•  Ulazna  sekvenca  se  deli  na  fraze.  Svaka  fraza  se  kodira  uz  pozivanje  na  već  postojeću  u  rečniku.  

•  Traži  se  najkraća  fraza  koje  nema  u  rečniku,  koja  se  zaGm  koduje  kao  fraza  iz  rečnika  +  jedan  karakter.  

•  Takva  nova  fraza  se  upisuje  u  rečnik  i  proces  se  ponavlja.  

Page 5: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

LZ77  i  LZ78  •  Primer:  ulazna  sekvenca:  

AABABBBABAABABBBABBABB  •  Prva  nova  fraza  je  samo  A  –  

(0,A).  Druga  nova  fraza  AB  –  (1,B).  (pozivanje  na  prvu  frazu  iz  rečnika  +  novi  karakter)  A|AB|ABBBABAABABBBABBAB    

•  Sledeća  fraza  je  ABB  -­‐  (2,B)  (pozivanje  na  drugu  frazu  iz  rečnika  +  novi  karakter)  A|AB|ABB|B|ABA|ABAB|BB|ABBA|BB  

•  Reference  Phrase  Encoding    •  Referenca:1    Fraza:  A  Kod:    

(0,A)    •  2  AB  (1,B)    •  3  ABB  (2,B)    •  4  B  (0,B)    •  5  ABA  (2,A)    •  6  ABAB  (5,B)    •  7  BB  (4,B)    •  8  ABBA  (3,A)    •  9  BB  (7,0)  

Page 6: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

Lossy  data  compression  •  Uklanja  se  deo  informacije  zarad  uštede  u  veličini  zapisa.  

•  Generalno,  lossy  algoritmi  se  zasnivaju  na  analizi  percepcije  ljudskih  čula.    

•  Primer:  oko  je  osetljivije  na  supGlne  promene  osvetljaja  nego  na  supGlne  promene  u  boji:  JPEG  se  delom  zasniva  na  “zaokruživanju”  u  tom  smislu  manje  bitnih  informacija.  

•  PsihoakusGčki  kodovi  koriste  efekat  maskiranja.  •  Govor  ima  posebne  karakterisGke  i  za  njegovu  kompresiju  se  razvijaju  posebni  algoritmi  (internet  telefonija...)  

Page 7: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  Procena  je  da  bi  bilo  moguće,  uz  primenu  već  postojećih  tehnika,  4.5  puta  smanjiG  memorijski  prostor  na  kojem  se  danas  čuvaju  sve  informacije.  

•  Procena  iz  2007.  godine:  1300  exabyte  (10^18  byte)  se  može  smanjiG  na  295  exabyte  memorijskog  prostora.  

•  60  CD-­‐ROM  ova  po  čoveku  na  planeG  –  oko  400  milijardi  diskova...  

Page 8: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  Tri  glavne  grupe  audio  formata:  1. Nekompresovani  audio  format  dobijen  putem  PCM-­‐a.  Obično  se  zapisuje  kao  .waw  format  u  Windows  okruženju  ili  .aiff  format  za  Mac  OS.  Na  kompakt  disku  je  to  CD  Audio  format.  

2. FormaG  sa  lossless  kompresijom:  FLAC,  Monkey’s  audio  (.ape),  WAVPACK  (.WV),  TTA,  ATRAC,  Apple  Lossless  (.m4a),  MPEG-­‐4  SLS,  MPEG-­‐4  ALS,  MPEG-­‐4  DST,  Windows  Media  Audio  Lossless  (.wma  lossless),  SHORTEN  (.shn)  

3. FormaG  sa  Lossy  kompresijom:  MP3,  VORBIS,  MUSEPACK,  AAC,  ATRAC,  Windows  Media  Audio  Lossy    

Page 9: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  3gp  -­‐  mulGmedia  container  format  can  contain  proprietary  formats  as  AMR,  AMR-­‐WB  or  AMR-­‐WB+,  but  also  some  open  formats  •  act  -­‐  ACT  is  a  lossy  ADPCM  8  kbit/s  compressed  audio  format  recorded  by  most  Chinese  MP3  and  MP4  players  with  a  recording  funcGon,  and  voice  recorders  •  AIFF  –  standard  audio  file  format  used  by  Apple.  It  could  be  considered  the  Apple  equivalent  of  wav.  •  aac  –  the  Advanced  Audio  Coding  format  is  based  on  the  MPEG2  and  MPEG4  standards.  aac  files  are  usually  ADTS  or  ADIF  containers.  •  ALAC  -­‐  Apple  Lossless  compression,  a  lossless  compression  format  from  Apple.  •  amr  -­‐  AMR-­‐NB  audio,  used  primarily  for  speech.  •  atrac  (.wav)  –  the  older  style  Sony  ATRAC  format.  It  always  has  a  .wav  file  extension.  To  open  these  files,  install  the  ATRAC3  drivers.  •  Au  –  the  standard  audio  file  format  used  by  Sun,  Unix  and  Java.  The  audio  in  au  files  can  be  PCM  or  compressed  with  the  μ-­‐law,  a-­‐law  or  G729  codecs.  •  awb  -­‐  AMR-­‐WB  audio,  used  primarily  for  speech,  same  as  the  ITU-­‐T's  G.722.2  specificaGon.  •  dct  –  A  variable  codec  format  designed  for  dictaGon.  It  has  dictaGon  header  informaGon  and  can  be  encrypted  (as  may  be  required  by  medical  confidenGality  laws).  A  

proprietary  format  of  NCH  Souware.  •  dss  –  Digital  Speech  Standard  files  are  an  Olympus  proprietary  format.  It  is  a  fairly  old  and  poor  codec.  Gsm  or  mp3  are  generally  preferred  where  the  recorder  allows.  

It  allows  addiGonal  data  to  be  held  in  the  file  header.  •  dvf  –  a  Sony  proprietary  format  for  compressed  voice  files;  commonly  used  by  Sony  dictaGon  recorders.  •  flac  –  File  format  for  the  Free  Lossless  Audio  Codec,  a  lossless  compression  codec.  •  gsm  –  designed  for  telephony  use  in  Europe,  gsm  is  a  very  pracGcal  format  for  telephone  quality  voice.  It  makes  a  good  compromise  between  file  size  and  quality.  

Note  that  wav  files  can  also  be  encoded  with  the  gsm  codec.  •  iklax  –  An  iKlax  Media  proprietary  format,  the  iKlax  format  is  a  mulG-­‐track  digital  audio  format  allowing  various  acGons  on  musical  data,  for  instance  on  mixing  and  

volumes  arrangements.  •  IVS  –  A  proprietary  version  with  Digital  Rights  Management  developed  by  3D  Solar  UK  Ltd  for  use  in  music  downloaded  from  their  Tronme  Music  Store  and  interacGve  

music  and  video  player.  •  m4a  –  A  proprietary  version  of  AAC  in  MP4  with  Digital  Rights  Management  developed  by  Apple  for  use  in  music  downloaded  from  their  iTunes  Music  Store.  •  mmf  -­‐  a  Samsung  audio  format  that  is  used  in  ringtones.  •  mp3  -­‐  MPEG  Layer  III  Audio.  Is  the  most  common  sound  file  format  used  today.  •  mpc  -­‐  Musepack  or  MPC  (formerly  known  as  MPEGplus,  MPEG+  or  MP+)  is  an  open  source  lossy  audio  codec,  specifically  opGmized  for  transparent  compression  of  

stereo  audio  at  bitrates  of  160–180  kbit/s.  •  msv  –  a  Sony  proprietary  format  for  Memory  SGck  compressed  voice  files.  •  mxp4  –  a  Musinaut  proprietary  format  allowing  play  of  different  versions  (or  skins)  of  the  same  song.  It  allows  various  interacGvity  scenarios  between  the  arGst  and  

the  end  user.  •  ogg  –  a  free,  open  source  container  format  supporGng  a  variety  of  formats,  the  most  popular  of  which  is  the  audio  format  Vorbis.  Vorbis  offers  compression  similar  to  

MP3  but  is  less  popular.  •  ra  &  rm  –  a  Real  Audio  format  designed  for  streaming  audio  over  the  Internet.  The  .ra  format  allows  files  to  be  stored  in  a  self-­‐contained  fashion  on  a  computer,  with  

all  of  the  audio  data  contained  inside  the  file  itself.  •  ram  –  a  text  file  that  contains  a  link  to  the  Internet  address  where  the  Real  Audio  file  is  stored.  The  .ram  file  contains  no  audio  data  itself.  •  raw  –  a  raw  file  can  contain  audio  in  any  format  but  is  usually  used  with  PCM  audio  data.  It  is  rarely  used  except  for  technical  tests.  •  TTA  -­‐  The  True  Audio,  real-­‐Gme  lossless  audio  codec.  •  vox  –  the  vox  format  most  commonly  uses  the  Dialogic  ADPCM  (AdapGve  DifferenGal  Pulse  Code  ModulaGon)  codec.  Similar  to  other  ADPCM  formats,  it  compresses  

to  4-­‐bits.  Vox  format  files  are  similar  to  wave  files  except  that  the  vox  files  contain  no  informaGon  about  the  file  itself  so  the  codec  sample  rate  and  number  of  channels  must  first  be  specified  in  order  to  play  a  vox  file.  

•  wav  –  standard  audio  file  container  format  used  mainly  in  Windows  PCs.  Commonly  used  for  storing  uncompressed  (PCM),  CD-­‐quality  sound  files,  which  means  that  they  can  be  large  in  size—around  10  MB  per  minute.  Wave  files  can  also  contain  data  encoded  with  a  variety  of  (lossy)  codecs  to  reduce  the  file  size  (for  example  the  GSM  or  MP3  formats).  Wav  files  use  a  RIFF  structure.  

•  wma  –  the  popular  Windows  Media  Audio  format  owned  by  Microsou.  Designed  with  Digital  Rights  Management  (DRM)  abiliGes  for  copy  protecGon.  

Page 10: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  Lossless  formaG  mogu  spusGG  veličinu  fajla  na  50-­‐60%  od  nekompresovane  veličine.  

•  Lossy  formaG,  u  zavisnosG  od  zahtevanog  kvaliteta,  mogu  spusGG  nekompresovan  fajl  na  5  do  20%  originalne  veličine.  

•  U  zavisnosG  od  formata  na  CD  može  staG  1  sat  nekompresovanog  zapisa  (PCM),  oko  2  sata  lossless  koda  ili  oko  7  saG  MP3  formata  srednjeg  kvaliteta.  

Page 11: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

CD  istorija  •  The  first  compact  disc  was  produced  in  a  factory  in  Germany  auer  

years  of  development  by  Philips  and  Sony.    •  The  compact  disc  project  was  launched  following  Philips'  failure  

with  its  video  disc  technology  in  1978.    •  The  video  disc  was  one  of  the  first  commercial  products  to  take  

advantage  of  laser  technology  that  could  read  informaGon  from  a  disc  without  any  physical  contact.    

•  Research  into  the  video  disc  began  as  far  back  as  1969,  and  itself  was  inspired  by  Italian  Antonio  Rubbiani,  who  had  demonstrated  a  rudimentary  video  disc  system  12  years  earlier.    

•  In  1970  Philips  began  work  on  what  was  called  the  ALP  (audio  long  play)  -­‐  an  audio  disc  system  to  rival  vinyl  records,  but  using  laser  technology.    

•  Lou  O{ens,  technical  director  of  the  audio  division  at  Philips,  was  the  first  to  suggest  that  the  ALP  be  made  smaller  than  the  dominant  vinyl  format  and  should  aim  for  one  hour  of  music.    

Page 12: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

CD  istorija  •  The  project  iniGally  flirted  with  the  idea  of  quadraphonic  sound  but  a  disc  

with  one  hour  of  music  had  to  be  20cm  in  diameter  and  so  the  plan  was  abandoned.    

•  In  1977  Philips  began  to  take  the  development  of  a  new  audio  format  much  more  seriously.  A  new  name  for  the  product  was  discussed  and  names  considered  included  Mini  Rack,  MiniDisc,  and  Compact  Rack.    

•  The  team  se{led  on  Compact  Disc  because  it  was  felt  it  would  remind  people  of  the  success  of  the  Compact  Casse{e.    

•  In  March  1979  Philips  conducted  a  press  conference  to  show  off  the  audio  quality  of  its  CD  system  in  producGon  and  also  to  impress  upon  rivals  how  well  it  was  progressing.    

•  A  week  later  Philips  travelled  to  Japan  auer  the  Japanese  Ministry  of  Industry  and  Technology  (MITI)  had  decided  to  convene  a  conference  to  discuss  how  the  industry  could  create  a  standard  for  the  audio  disc.  The  company  leu  Japan  having  agreed  a  deal  with  Sony.    

•  Philips'  plan  for  a  CD  with  a  11.5cm  diameter  had  to  be  changed  when  Sony  insisted  that  a  disc  must  hold  all  of  Beethoven's  9th  Symphony.  The  longest  recording  of  the  symphony  in  record  label  Polygram's  archive  was  74  minutes  and  so  the  CD  size  was  increased  to  12cm  diameter  to  accommodate  the  extra  data.    

Page 13: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

CD  istorija  •  In  1980  Philips  and  Sony  produced  their  Red  Book,  which  laid  down  all  the  

standards  for  compact  discs.  From  that  Gme  on  the  companies  worked  separately  on  their  own  CD  equipment  but  in  the  early  days  agreed  to  share  components.    

•  In  April  1982  Philips  showed  off  a  producGon  CD  player  for  the  first  Gme.  "From  now  on,  the  convenGonal  record  player  is  obsolete,"  said  Lou  O{ens.    

•  The  first  commercial  CDs  pressed  were  The  Visitors  by  Abba  and  a  recording  of  Herbert  von  Karajan  conducGng  the  Alpine  Symphony  by  Richard  Strauss.    

•  US  record  labels  were  iniGally  very  scepGcal  about  the  CD.  A  year  auer  launch  there  were  1,000  different  Gtles  available.    

•  In  1985  Dire  Straits'  Brothers  In  Arms  became  the  first  CD  to  sell  more  than  one  million  copies.  It  is  sGll  the  world's  most  successful  CD  album.    

•  In  2000  global  sales  of  CD  albums  peaked  at  2.455  billion.  In  2006  that  figure  was  down  to  1.755  billion.    

Page 14: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

CD  Audio  

•  Red  Book  –  dokument  sa  standardima.  •  Dvokanalni  audio,  44.1  kHz,  16  bit.  Red  Book  dozvoljava  upis  i  4  kanala  (kvadrofonija),  ali  to  nikada  nije  zaživelo.  Mono  zapis  nije  predviđen.  

•  44.1  kHz  je  standard  dobijen  na  osnovu  činjenice  da  se  digitalni  audio  zapis  u  to  vreme  čuvao  na  video  trakama.  3  sempla  po  jednom  kanalu  su  mogla  biG  zapisana  u  jednu  video  liniju.  PAL  standard:  294  linije,  50  polufrejmova  u  sekundi:  3x294x50  =  44.100  semplova  u  sekundi.  

Page 15: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  Osnovni  audio  zapis  je  nasato  klasičnim  PCM  kodovanjem.  Na  tu  osnovnu  informaciju  dodaju  se  biG  za  zašGtno  kodovanje  i  prilagođavanje  zapisu  na  fizički  medij.  

•  .waw  Gp  fajla  je  veoma  sličan  (klasičan  PCM),  samo  je  osnovna  informacija  prilagođena  za  upisivanje  na  računarske  memorije.  

•  .cda  nije  audio  format,  već  samo  info  fajl,  koji  obezbeđuje  informaciju  da  se  u  računaru  nalazi  CD  u  audio  formatu.    

•  Pohranjivanje  audio  zapisa  direktno  sa  CD-­‐a  na  hard  disk  nije  moguće  zbog  razlike  u  strukturi  podataka.  Neophodna  je  souverska  transformacija  –  ripovanje.  

Page 16: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

FLAC  •  Free  Lossless  Audio  Codec  •  Codec  =  Koder  +  Dekoder  •  Fajl  se  na  izvoru  kodira  i  redukuje  na  50  –  60%  od  originalne  veličine.  

•  Na  prijemu  se  vrši  dekodiranje  tako  da  konačni  fajl  nema  gubitaka  u  odnosu  na  originalni.  

•  Besplatan  dekoder,  dostupan  za  javnu  upotrebu.  

•  Omogućava  zapis  meta-­‐data  podataka,  ime  izvođača,  naslov  albuma,  kao  i  brzo  traženje.  

Page 17: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

FLAC  •  Razvoj  dekodera  započet  2000.  godine  (Josh  Coalson)  

•  2003.  ga  u  svoje  okrilje  uzima    Xiph.Org  FoundaGon  

•  Xiph.org  je  fondacija  koja  se  bavi  razvojem  besplatnih  kodeka  koji  mogu  da  se  takmiče  sa  komercijalnim  formaGma.  

•  Ogg  familija  formata,  među  kojima  je  najuspešniji  Vorbis,  koji  je  pandan  .mp3  formatu  

•  Danas  najviše  rade  na  razvoju  formata  koji  treba  da  konkurišu  .mpeg4    

Page 18: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

FLAC  •  It  can  handle  any  PCM  bit  resoluGon  from  4  to  32  bits  per  sample,  

any  sampling  rate  from  1  Hz  to  655,350  Hz  in  1  Hz  increments,[7]  and  any  number  of  channels  from  1  to  8.[8]Channels  can  be  grouped  in  cases  like  stereo  and  5.1  channel  surround  to  take  advantage  of  interchannel  correlaGons  to  increase  compression.  FLAC  uses  CRCchecksums  for  idenGfying  corrupted  frames  when  used  in  a  streaming  protocol,  and  also  has  a  complete  MD5  hash  of  the  raw  PCM  audio  stored  in  its  STREAMINFOmetadata  header.  FLAC  allows  for  a  Rice  parameter  between  0  and  16.  FLAC  supports  ReplayGain.  

•  FLAC  uses  linear  predicGon  to  convert  the  audio  samples  to  a  series  of  small,  uncorrelated  numbers  (known  as  the  residual),  which  are  stored  efficiently  using  Golomb-­‐Rice  coding.  It  also  uses  run-­‐length  encoding  for  blocks  of  idenGcal  samples,  such  as  silent  passages.  

•  For  tagging,  FLAC  uses  the  same  system  as  Vorbis  comments.[7]  

Page 19: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

MP3  

•  Audio  format  razvijen  od  strane  MPEG  (Moving  Pictures  Expert  Group)  

•  MPEG  1  i  2,  layer  III  =  MP3  •  1992.  godina  (MPEG  1).    •  1995.  godina  (MPEG  2)  (dodatni  bit  rate  protoci)  

•  Protok  128  kb/s  omogućava  smanjenja  originalnog  PCM  zapisa  na  10%  veličine.    

Page 20: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

MP3    

•  Zasniva  se  na  efektu  maskiranja.  •  1894.  u  literaturi  se  pojavio  članak  o  uGcaju  tonova  nižih  frekvencija  i  viših  nivoa  na  gubitak  čujnosG  ostalih  tonova.  

•  1959.  Richard  Emer  je  detaljno  proučio  i  opisao  ovaj  fenomen,  definisavši  set  krivih  na  osnovu  kojih  je  moguće  predvideG  efekte  maskiranja.  

Page 21: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  1979.  u  SAD  je  prvi  put  predloženo  korišćenje  efekta  maskiranja  za  potrebe  razvoja  kompresionih  audio  kodova.  

•  MP3  je  direktan  naslednik  prethodno  razvijenih  kodova:  OpGmum  Coding  in  the  Frequency  Domain"  (OCF),  and  Perceptual  Transform  Coding  (PXFM)    

•  Oba  koda  su  bila  prihvaćena  od  strane  MPEG-­‐a,  u  to  doba  najkvalitetniji,  ali  zahtevni  za  postojeći  hardver.  

Page 22: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

•  Ništa  bez  Nemaca!  Karlheinz  Brandenburg  je  iskorisGo  pesmu  Suzan  Vega  “Tom’s  Dinner”  za  procenu  algoritma  koji  će  postaG  MP3.  Pesma  je  skoro  monofona,  sa  bogaGm  spektrom,  zgodna  za  analizu  i  poređenje.  

•  Suzan  Vega  –  majka  mp3  formata  J  •  .mp3  ekstenzija  zaživela  14.  jula  1995.  godine.  Pre  toga  korišćena  je  .bit  ekstenzija.  

Page 23: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

mp3  •  U  drugoj  polovini  1994.  mpr  počinje  da  se  korisG  na  internetu.  •  Pojavom  Winamp  plejera  (1997.  godina),  popularnost  formata  

naglo  raste.  •  Kodiranje  mp3  formata  nije  do  kraja  precizirano.  MPEG1  

standard  definiše  načine  i  metode  za  otklanjanje  nečujnih  informacija.  

•  Razvijen  je  veliki  broj  različiGh  mp3  kodera,  od  kojih  zavisi  kvalitet  kodiranja.  

•  Koderi  se  razlikuju  i  na  interentu  su  dostupne  karakterisGke  i  uporedni  testovi.  

•  Koder  dobar  za  velike  bitske  protoke  (npr.  LAME),  ne  mora  biG  dobar  i  za  male  protoke.  

Page 24: Datacompression Source$coding$orBitrate$ reducon ...websrv3.viser.edu.rs/avt/stari/download/PDF/doavs_p03.pdf• Takvanovafrazase"upisuje"u"rečnik"i"proces"se" ponavlja." LZ77iLZ78

mp3  

•  Dekodiranje  je  strogo  specificirano.  •  Dekoderi  se  ne  razlikuju  po  kvalitetu,  već  samo  po  memorijskom  ili  CPU  angažmanu.  

•  Kvalitet  konačnog  fajla  zavisi  od  kodera,  bitskog  protoka,  ali  i  samog  audio  fajla  koji  se  koduje.  

•  Zapisi  sa  puno  brzih  promena,  tranzijenata  i  sl.  Nisu  pogodni  za  kodovanja  sa  niskim  bitskim  protocima  –  (ringing,  pre-­‐echo..)  

•  Dobar  primer  –  aplauz  publike...