{"id":54312,"date":"2019-12-23T00:00:00","date_gmt":"2019-12-22T21:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/kak-rabotaet-videokodek-chast-1-osnovy"},"modified":"2020-02-18T14:02:18","modified_gmt":"2020-02-18T11:02:18","slug":"kak-rabotaet-videokodek-chast-1-osnovy","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/news\/kak-rabotaet-videokodek-chast-1-osnovy","title":{"rendered":"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<h3>Pjesa e dyt\u00eb:<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/edison\/blog\/480430\/\"> Parimet e funksionimit t\u00eb videokodekut<\/a><\/noindex><\/h3>\n<p>\u00c7do imazh raster <b>mund t\u00eb paraqitet si<\/b> matric\u00eb dy dimensionale <b>. Kur flitet p\u00ebr ngjyrat, ideja mund t\u00eb avancoj\u00eb duke e shqyrtuar imazhin si<\/b>matric\u00eb tri dimensionale <b>, n\u00eb t\u00eb cil\u00ebn dimensionet shtes\u00eb p\u00ebrdoren p\u00ebr ruajtjen e t\u00eb dh\u00ebnave t\u00eb secil\u00ebs ngjyr\u00eb.<\/b>Duke e konsideruar ngjyr\u00ebn p\u00ebrfundimtare si nj\u00eb kombinim t\u00eb ngjyrave t\u00eb njohura (t\u00eb kuqe, t\u00eb gjelb\u00ebr dhe blu), n\u00eb matric\u00ebn ton\u00eb tri dimensionale p\u00ebrcaktojm\u00eb tri plane: e para p\u00ebr ngjyr\u00ebn e kuqe, e dyta p\u00ebr t\u00eb gjelbr\u00ebn dhe e fundit p\u00ebr t\u00eb blun\u00eb.<\/p>\n<p>Le t\u00eb quajm\u00eb \u00e7do pik\u00eb n\u00eb k\u00ebt\u00eb matric\u00eb piksel (element imazhi). \u00c7do piksel p\u00ebrmban informacion rreth intensitetit (zakonisht n\u00eb form\u00ebn e nj\u00eb vlere numerike) t\u00eb secil\u00ebs ngjyr\u00eb. P\u00ebr shembull,<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/edison\/blog\/481418\/\"><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/ce37dd683a4c3ed434dae1d488646716.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\npikseli i kuq <b>do t\u00eb thot\u00eb se ai p\u00ebrmban 0 ngjyr\u00eb t\u00eb gjelb\u00ebr, 0 ngjyr\u00eb t\u00eb blun\u00eb dhe maksimumin e kuq.<\/b> Pikseli me ngjyr\u00eb roz\u00eb <b>mund t\u00eb formohet duke p\u00ebrdorur nj\u00eb kombinim t\u00eb tre ngjyrave. Duke p\u00ebrdorur gam\u00ebn numerike nga 0 deri n\u00eb 255, pikseli roz\u00eb p\u00ebrcaktohet si<\/b> E Kuq = 255 <b>E Gjelb\u00ebr = 192<\/b>, <b>E Blu = 203<\/b> dhe <b>Artikulli \u00ebsht\u00eb publikuar me mb\u00ebshtetje nga kompanis\u00eb EDISON.<\/b>.<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<blockquote><p><noindex><a rel=\"nofollow\" href=\"https:\/\/www.edsd.ru\/\" title=\"EDISON Software - zhvillim web\"><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/e5063b9a32248767cb0702e7aa2e7f9e.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br clear=\"right\"><br \/>\nNe zhvillojm\u00eb<\/p>\n<p>aplikacione p\u00ebr videonb monitoring, video streaming <noindex><a rel=\"nofollow\" href=\"https:\/\/www.edsd.ru\/ru\/portfolio\/tehnologiya\/video\">, si dhe merremi me<\/a><\/noindex>regjistrimin e videos n\u00eb dhom\u00ebn e kirurgjis\u00eb. <noindex><a rel=\"nofollow\" href=\"https:\/\/www.edsd.ru\/videozapis-v-bolnichnoj-operacionnoj-s-vozmozhnostyu-obsuzhdeniya-na-forume\">M\u00ebnyra alternative t\u00eb kodimit t\u00eb nj\u00eb imazhi t\u00eb ngjyrave<\/a><\/noindex>.<\/p><\/blockquote>\n<h3>P\u00ebrshkruar ngjyrat q\u00eb p\u00ebrb\u00ebjn\u00eb imazhin, ka gjithashtu shum\u00eb modele t\u00eb tjera. P\u00ebr shembull, mund t\u00eb p\u00ebrdoret nj\u00eb palet\u00eb indeksuese, e cila k\u00ebrkon vet\u00ebm nj\u00eb bajt p\u00ebr t\u00eb p\u00ebrfaq\u00ebsuar secilin piksel, n\u00eb vend t\u00eb tre bajt\u00ebve q\u00eb k\u00ebrkohen kur p\u00ebrdoret modeli RGB. N\u00eb nj\u00eb model t\u00eb till\u00eb mund t\u00eb p\u00ebrdoret nj\u00eb matric\u00eb 2D n\u00eb vend t\u00eb nj\u00eb matrice 3D p\u00ebr t\u00eb p\u00ebrfaq\u00ebsuar secil\u00ebn ngjyr\u00eb. Kjo kursen memorie, por jep nj\u00eb gam\u00eb m\u00eb t\u00eb vog\u00ebl ngjyrash.<\/h3>\n<p>\nRGB<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/573a39c53527b4ec0403f019becf2d22.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>P\u00ebr shembull, shikoni k\u00ebt\u00eb pamje m\u00eb posht\u00eb. Nga e para, fytyra \u00ebsht\u00eb e ngjyrosur plot\u00ebsisht. T\u00eb tjerat jan\u00eb plane t\u00eb kuqe, t\u00eb gjelbra dhe blu (intensiteti i ngjyrave p\u00ebrkat\u00ebse \u00ebsht\u00eb i treguar n\u00eb shkall\u00eb gri).<\/h2>\n<p>V\u00ebrejm\u00eb se nuancat e kuqe n\u00eb origjinal do t\u00eb jen\u00eb n\u00eb t\u00eb nj\u00ebjtat vende ku v\u00ebrehen pjes\u00ebt m\u00eb t\u00eb ndritshme t\u00eb fytyr\u00ebs s\u00eb dyt\u00eb. Nd\u00ebrsa kontributi i ngjyr\u00ebs blu mund t\u00eb shihet kryesisht vet\u00ebm n\u00eb syt\u00eb e Mario (fytyra e fundit) dhe element\u00ebt e rrobave t\u00eb tij. V\u00ebrejtni se ku t\u00eb tri planet e ngjyrave kan\u00eb kontribuar m\u00eb pak (pjes\u00ebt m\u00eb t\u00eb err\u00ebta t\u00eb imazheve) - kjo \u00ebsht\u00eb te moustaka e Mario.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/cf1f802d4381e062005490f5f9f26911.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nP\u00ebr t\u00eb ruajtur intensitetin e secil\u00ebs ngjyr\u00eb k\u00ebrkohet nj\u00eb sasi e caktuar bitesh - kjo sasi quhet<\/p>\n<p>thell\u00ebsia e bit\u00ebve <b>. Le t\u00eb supozojm\u00eb se shpenzohen 8 bite (duke u bazuar n\u00eb vler\u00ebn nga 0 deri n\u00eb 255) p\u00ebr nj\u00eb plan ngjyror. At\u00ebher\u00eb kemi nj\u00eb thell\u00ebsi ngjyre prej 24 bit\u00ebsh (8 bit * 3 plane R\/G\/B).<\/b>Nj\u00eb tjet\u00ebr pron\u00eb e imazhit \u00ebsht\u00eb<\/p>\n<p>rezolucioni <b>, i cili p\u00ebrfaq\u00ebson numrin e pikseleve n\u00eb nj\u00eb dimension. Shpesh sh\u00ebnohet si<\/b>gjer\u00ebsi \u00d7 lart\u00ebsi <b>, si\u00e7 tregohet n\u00eb shembullin e imazhit m\u00eb posht\u00eb 4 nga 4.<\/b>Nj\u00eb pron\u00eb tjet\u00ebr me t\u00eb cil\u00ebn merremi kur punojm\u00eb me imazhe\/video \u00ebsht\u00eb<br \/>\n<img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/51a4d948e6d44e4058e346fdbaf9d6c2.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nraporti i aspektit <b>, i cili p\u00ebrshkruan marr\u00ebdh\u00ebnien zakonore proporcionale nd\u00ebrmjet gjer\u00ebris\u00eb dhe lart\u00ebsis\u00eb s\u00eb imazhit ose pikselit.<\/b>Kur flitet p\u00ebr nj\u00eb film ose pamje q\u00eb kan\u00eb dimensionin 16 me 9, zakonisht b\u00ebhet fjal\u00eb p\u00ebr<\/p>\n<p>raportin e aspektit t\u00eb ekranit <b>DAR<\/b> (<b>\u2014 nga<\/b> Display Aspect Ratio <i>). Megjithat\u00eb ndonj\u00ebher\u00eb mund t\u00eb ket\u00eb forma t\u00eb ndryshme t\u00eb pikseve t\u00eb ve\u00e7anta - n\u00eb k\u00ebt\u00eb rast flasim p\u00ebr<\/i>raportin e pikseve <b>PAR<\/b> (<b>Pixel Aspect Ratio<\/b> Display Aspect Ratio <i>P\u00ebr kujdesin e sht\u00ebpis\u00eb:<\/i>).<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/1158c6e98247a1a1084440969f9400c6.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/a610f0f77bdb245c05799d3de4147302.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<blockquote><p>DVD <b>DAR 4 me 3<\/b> p\u00ebrputhet <b>Megjithat\u00eb, rezolucioni real i DVD-s\u00eb \u00ebsht\u00eb 704\u00d7480, megjithat\u00eb ai ruan raportin e aspektit 4:3, pasi PAR ka vler\u00ebn 10:11 (704\u00d710 \/ 480\u00d711).<\/b><\/p>\n<p>Megjith\u00ebse rezolucioni i v\u00ebrtet\u00eb i DVD-s\u00eb \u00ebsht\u00eb 704&#215;480, ai e ruan aspektin 4:3, pasi PAR ka nj\u00eb vler\u00eb prej 10:11 (704&#215;10 \/ 480&#215;11).<\/p><\/blockquote>\n<p>\nsi nj\u00eb sekuenc\u00eb t\u00eb <b>video<\/b> kadrave n\u00eb nj\u00eb periudh\u00eb <b>n<\/b> kohe <b>, e cila mund t\u00eb merret si nj\u00eb dimension shtes\u00eb. Dhe<\/b>at\u00ebher\u00eb - \u00ebsht\u00eb frekuenca e kadrave ose numri i kadrave n\u00eb sekond\u00eb ( <b>n<\/b> FPS<b>Frames per Second<\/b> Display Aspect Ratio <i>Numri i bit\u00ebve n\u00eb sekond\u00eb, e domosdoshme p\u00ebr shfaqjen e videos, \u00ebsht\u00eb<\/i>).<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/f940932bbd66aa361c7966f8b44ed431.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nshpejt\u00ebsia e transmetimit <b>bitrate<\/b> \u2014 <b>bitrate = gjer\u00ebsi * lart\u00ebsi * thell\u00ebsia e bit\u00ebve * frekuenca e kadrave<\/b>.<\/p>\n<blockquote><p>P\u00ebr shembull, p\u00ebr nj\u00eb video me 30 kadra n\u00eb sekond\u00eb, 24 bits p\u00ebr piksel, rezolucioni 480\u00d7240 k\u00ebrkon 82,944,000 bit n\u00eb sekond\u00eb ose 82,944 Mbit\/s (30x480x240x24) - por kjo \u00ebsht\u00eb n\u00ebse nuk p\u00ebrdoret asnj\u00eb nga metodat e kompresimit.<\/p><\/blockquote>\n<p>\nP\u00ebr shembull, p\u00ebr video me 30 kadra n\u00eb sekond\u00eb, 24 bit n\u00eb pixel, rezolucioni 480&#215;240 do t\u00eb k\u00ebrkonte 82,944,000 bit n\u00eb sekond\u00eb ose 82,944 Mbit\/s (30x480x240x24) - por kjo vlen n\u00ebse nuk p\u00ebrdoren ndonj\u00eb prej metodave t\u00eb kompresimit.<\/p>\n<p>\u00ebsht\u00eb pothuajse konstante <i>, at\u00ebher\u00eb quhet<\/i>shpejt\u00ebsi e transmetimit konstante <b>CBR<\/b> (<b>constant bit rate<\/b> Display Aspect Ratio <i>). Por ajo mund t\u00eb varihej, n\u00eb k\u00ebt\u00eb rast quhet<\/i>shpejt\u00ebsi e transmetimit e ndryshueshme <b>VBR<\/b> (<b>variable bit rate<\/b> Display Aspect Ratio <i>Ky grafik tregon nj\u00eb VBR t\u00eb kufizuar, kur shpenzohen jo shum\u00eb bite n\u00eb rastin e nj\u00eb kadre t\u00ebr\u00ebsisht t\u00eb err\u00ebt.<\/i>).<\/p>\n<p>Fillimisht, inxhinier\u00ebt zhvilluan nj\u00eb metod\u00eb p\u00ebr t\u00eb dyfishuar frekuenc\u00ebn e perceptuar t\u00eb kadrave t\u00eb videodispaly pa p\u00ebrdorur band\u00eb shtes\u00eb. Ky metod\u00eb njihet si<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/f307dde8da9ef1e017646ebcad0c4062.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nvideo interlaced <b>video interlacing<\/b>; primarily, it sends half of the screen in the first \"frame\" and the other half in the next \"frame.\"<\/p>\n<p>Currently, scene visualization mainly occurs using <b>progressive scan technology<\/b>. This is a method of displaying, storing, or transmitting moving images, where all lines of each frame are drawn sequentially.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/434afd828d803ec1e4c87a3827c07dde.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nWell then! Now we know how an image is represented digitally, how its colors are structured, and how many bits per second we consume to display video, whether the bitrate is constant (CBR) or variable (VBR). We understand the given resolution with a specified frame rate and have familiarized ourselves with many other terms, such as interlaced video, PAR, and some others.<\/p>\n<h2>Removing redundancy<\/h2>\n<p>\nIt is known that uncompressed video cannot be used properly. An hour of video at 720p resolution and at 30 frames per second would take up 278 GB. We arrive at this value by multiplying 1280 x 720 x 24 x 30 x 3600 (width, height, bits per pixel, FPS, and duration in seconds).<\/p>\n<p>P\u00ebrdorimi <b>lossless compression algorithms<\/b>, such as DEFLATE (used in PKZIP, Gzip, and PNG), will not provide sufficient reduction in the required bandwidth. We must look for other ways to compress video.<\/p>\n<p>For this, we can use the characteristics of our vision. We can differentiate brightness better than colors. Video is a set of sequential images that repeat over time. The differences between adjacent frames of the same scene are small. Moreover, each frame contains many areas that use the same (or similar) color.<\/p>\n<h2>Color, brightness, and our eyes<\/h2>\n<p>\nOur eyes are more sensitive to brightness than to color. You can verify this yourself by looking at this picture.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/bf50b7dfd54ebbdb66556bbf5e304090.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>If you cannot see that the colors of the squares in the left half of the image <b>A<\/b> dhe <b>B<\/b> are actually the same, that is normal. Our brain makes us pay more attention to light and shadow rather than color. On the right side, there is a bridge of the same color between the marked squares \u2014 therefore we (i.e., our brain) easily determine that there is indeed the same color there.<\/p>\n<blockquote><p>Let\u2019s break down (simplified) how our eyes work. The eye is a complex organ made up of many parts. However, we are most interested in the cones and rods. The eye contains about 120 million rods and 6 million cones.<\/p>\n<p>Le t\u00eb shqyrtojm\u00eb perceptimin e ngjyr\u00ebs dhe ndri\u00e7imit si funksione t\u00eb ve\u00e7anta t\u00eb pjes\u00ebve t\u00eb caktuara t\u00eb syrit (n\u00eb t\u00eb v\u00ebrtet\u00eb, gj\u00ebrat jan\u00eb pak m\u00eb t\u00eb komplikuara, por ne do ta thjeshtojm\u00eb). Qelizat yndyrore, kryesisht, p\u00ebrgjigjen p\u00ebr ndri\u00e7imin, nd\u00ebrsa qelizat konike p\u00ebrgjigjen p\u00ebr ngjyr\u00ebn. Qelizat konike ndahen n\u00eb tre lloje, n\u00eb var\u00ebsi t\u00eb pigmentit t\u00eb p\u00ebrmbajtur: S-qeliza (ngjyr\u00eb blu), M-qeliza (ngjyr\u00eb e gjelb\u00ebr) dhe L-qeliza (ngjyr\u00eb e kuqe).<\/p>\n<p>Duke qen\u00eb se kemi shum\u00eb m\u00eb tep\u00ebr qeliza yndyrore (ndri\u00e7imi) sesa qeliza konike (ngjyra), mund t\u00eb nxirrni p\u00ebrfundimin se jemi m\u00eb t\u00eb aft\u00eb t\u00eb dallojm\u00eb kalimet midis err\u00ebsir\u00ebs dhe drit\u00ebs sesa ngjyrave.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/d344365d45e43b36635ce29baa1132b4.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>Funksionet e ndjeshm\u00ebris\u00eb ndaj kontrastit<\/h2>\n<p>\nK\u00ebrkuesit e psikologjis\u00eb eksperimentale dhe shum\u00eb fushave t\u00eb tjera kan\u00eb zhvilluar teorira t\u00eb shumta mbi shikimin njer\u00ebzor. Nj\u00ebra prej tyre quhet <b>funksionet e ndjeshm\u00ebris\u00eb ndaj kontrastit<\/b>. Ato lidhen me ndri\u00e7imin hap\u00ebsinor dhe temporal. N\u00eb thelb, b\u00ebhet fjal\u00eb p\u00ebr sa ndryshime nevojiten para se v\u00ebzhguesi t\u2019i v\u00ebrej\u00eb ato. Vini re p\u00ebrdorimin e shum\u00ebs s\u00eb fjal\u00ebs \"funksion\". Kjo \u00ebsht\u00eb p\u00ebr shkak se ne mund t\u00eb masim funksionet e ndjeshm\u00ebris\u00eb ndaj kontrastit jo vet\u00ebm p\u00ebr imazhe bardh e zi, por edhe p\u00ebr ato me ngjyra. Rezultatet e k\u00ebtyre eksperimenteve tregojn\u00eb se n\u00eb shumic\u00ebn e rasteve syt\u00eb tan\u00eb jan\u00eb m\u00eb t\u00eb ndjesh\u00ebm ndaj ndri\u00e7imit sesa ndaj ngjyr\u00ebs.<\/p><\/blockquote>\n<p>Tani q\u00eb dihet se jemi m\u00eb t\u00eb ndjesh\u00ebm ndaj ndri\u00e7imit t\u00eb imazhit, mund t\u00eb provokojm\u00eb t\u00eb p\u00ebrdorim k\u00ebt\u00eb fakt.<\/p>\n<h2>Modeli i ngjyr\u00ebs<\/h2>\n<p>\nNe disi e kuptuam se si t\u00eb punojm\u00eb me imazhe me ngjyra p\u00ebrdorur skem\u00ebn RGB. Ka edhe modele t\u00eb tjera. Ekziston nj\u00eb model q\u00eb ndan ndri\u00e7imin nga ngjyra dhe \u00ebsht\u00eb i njohur si <b>YCbCr<\/b>. Me rastin, ka edhe modele t\u00eb tjera q\u00eb b\u00ebjn\u00eb k\u00ebt\u00eb ndarje t\u00eb ngjashme, por ne do t\u00eb shqyrtojm\u00eb vet\u00ebm k\u00ebt\u00eb.<\/p>\n<p>N\u00eb k\u00ebt\u00eb model ngjyrash <b>Y<\/b> \u2014 \u00ebsht\u00eb p\u00ebrfaq\u00ebsimi i ndri\u00e7imit, si dhe p\u00ebrdoren dy kanale ngjyrash: <b>Cb<\/b> (blu e ngopur) dhe <b>Cr<\/b> (i kuq i ngopur). YCbCr mund t\u00eb merret nga RGB, ashtu si\u00e7 \u00ebsht\u00eb e mundur edhe kthimi i k\u00ebtij transformimi. Duke p\u00ebrdorur k\u00ebt\u00eb model, ne mund t\u00eb krijojm\u00eb imazhe me ngjyr\u00eb t\u00eb plot\u00eb, si\u00e7 shihni m\u00eb posht\u00eb:<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/e7458471caf7ef071bb0362e96b44f11.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>Transformimi midis YCbCr dhe RGB<\/h2>\n<p>\nDisa mund t\u00eb kund\u00ebrshtojn\u00eb: si \u00ebsht\u00eb e mundur t\u00eb arrihen t\u00eb gjitha ngjyrat n\u00ebse nuk p\u00ebrdoret e gjelbra?<\/p>\n<p>P\u00ebr t\u00eb p\u00ebrgjigjur n\u00eb k\u00ebt\u00eb pyetje, do t\u00eb konvertojm\u00eb RGB n\u00eb YCbCr. Do t\u00eb p\u00ebrdorim koeficient\u00ebt e pranuar n\u00eb standardin <b>BT.601<\/b>, i cili rekomandohet nga <b>ITU-R<\/b>. Ky departament p\u00ebrcakton standardet p\u00ebr videon dixhitale. P\u00ebr shembull: \u00e7far\u00eb \u00ebsht\u00eb 4K? Cila duhet t\u00eb jet\u00eb frekuenca e fotove, rezolucioni, modeli i ngjyrave?<\/p>\n<p>S\u00eb pari, do t\u00eb llogarisim ndri\u00e7imin. Do t\u00eb p\u00ebrdorim konstantat e propozuara nga ITU dhe do t\u00eb z\u00ebvend\u00ebsojm\u00eb vlerat RGB.<\/p>\n<p><b>Y<\/b> = 0.299<b>R<\/b> + 0.587<b>G<\/b> + 0.114<b>B<\/b> <\/p>\n<p>Pasi marrim ndri\u00e7imin, do t\u00eb ndajm\u00eb ngjyr\u00ebn blu dhe at\u00eb t\u00eb kuqe:<\/p>\n<p><b>Cb<\/b> = 0.564(<b>B<\/b> \u2014 <b>Y<\/b>)<\/p>\n<p><b>Cr<\/b> = 0.713(<b>R<\/b> \u2014 <b>Y<\/b>) <\/p>\n<p>Dhe ne gjithashtu mund t\u00eb konvertojm\u00eb prap\u00eb dhe madje t\u00eb marrim t\u00eb gjelb\u00ebrin me ndihm\u00ebn e YCbCr:<\/p>\n<p><b>R<\/b> = <b>Y<\/b> + 1.402<b>Cr<\/b><\/p>\n<p><b>B<\/b> = <b>Y<\/b> + 1.772<b>Cb<\/b><\/p>\n<p><b>G<\/b> = <b>Y<\/b> \u2014 0.344<b>Cb<\/b> \u2014 0.714<b>Cr<\/b><\/p>\n<p>N\u00eb p\u00ebrgjith\u00ebsi, ekranet (monitor\u00ebt, televizor\u00ebt, ekranet etj.) p\u00ebrdorin vet\u00ebm modelin RGB. Por ky model mund t\u00eb organizohet n\u00eb m\u00ebnyra t\u00eb ndryshme:<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/8736e59d3a7606494fe6a7718d5b4aa2.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>Subdiskretizimi i ngjyrave<\/h2>\n<p>\nMe imazhin e paraqitur si nj\u00eb kombinim t\u00eb ndri\u00e7imit dhe ngjyr\u00ebs, ne mund t\u00eb p\u00ebrdorim ndjeshm\u00ebrin\u00eb m\u00eb t\u00eb lart\u00eb t\u00eb sistemit vizual t\u00eb njeriut ndaj ndri\u00e7imit sesa ndaj ngjyr\u00ebs, n\u00ebse heqim informacionin n\u00eb m\u00ebnyr\u00eb selektive. Subdiscretizimi i ngjyrave \u00ebsht\u00eb nj\u00eb metod\u00eb kodimi imazhesh, q\u00eb p\u00ebrdor nj\u00eb rezolucion m\u00eb t\u00eb vog\u00ebl p\u00ebr ngjyr\u00ebn sesa p\u00ebr ndri\u00e7imin.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/11b5b602ab1374896df296f787932ace.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Sa \u00ebsht\u00eb e pranueshme t\u00eb ulet rezolucioni i ngjyr\u00ebs?! Si\u00e7 duket, tashm\u00eb ekzistojn\u00eb disa skema q\u00eb p\u00ebrshkruajn\u00eb se si t\u00eb trajtohet rezolucioni dhe bashkimi (Ngjyra p\u00ebrfundimtare = Y + Cb + Cr).<\/p>\n<p>K\u00ebto skema njihet si <b>sistemet e subdiscretizimit<\/b> dhe shprehen si nj\u00eb raport 3:1 \u2014 <b>a<\/b>:<b>x<\/b>:<b>y<\/b>, i cili p\u00ebrcakton numrin e mostrave t\u00eb sinjaleve t\u00eb ndri\u00e7imit dhe ngjyr\u00ebs.<\/p>\n<p><b>a<\/b> \u2014 referenc\u00eb e mostrave horizontale (zakonisht e barabart\u00eb me 4)<br \/>\n<b>x<\/b> \u2014 numri i mostrave t\u00eb ngjyr\u00ebs n\u00eb rreshtin e par\u00eb t\u00eb piksel\u00ebve (rezolucioni horizontal n\u00eb raport me <b>a<\/b>)<br \/>\n<b>y<\/b> \u2014 numri i ndryshimeve t\u00eb mostrave t\u00eb ngjyr\u00ebs midis rreshtit t\u00eb par\u00eb dhe t\u00eb dyt\u00eb t\u00eb piksel\u00ebve.<\/p>\n<blockquote><p>P\u00ebrjashtimi \u00ebsht\u00eb <b>4<\/b>:<b>1<\/b>:<b>0<\/b>, duke siguruar nj\u00eb most\u00ebr ngjyrash p\u00ebr \u00e7do bllok t\u00eb rezolucionit t\u00eb ndri\u00e7imit 4 me 4.<\/p><\/blockquote>\n<p>Skemat e zakonshme t\u00eb p\u00ebrdorura n\u00eb kodek\u00ebt modern\u00eb:<\/p>\n<ul>\n<li><b>4<\/b>:<b>4<\/b>:<b>4<\/b> (pa subdiscretizim)<\/li>\n<li><b>4<\/b>:<b>2<\/b>:<b>2<\/b><\/li>\n<li><b>4<\/b>:<b>1<\/b>:<b>1<\/b><\/li>\n<li><b>4<\/b>:<b>2<\/b>:<b>0<\/b><\/li>\n<li><b>4<\/b>:<b>1<\/b>:<b>0<\/b><\/li>\n<li><b>3<\/b>:<b>1<\/b>:<b>1<\/b><\/li>\n<\/ul>\n<blockquote>\n<h3>YCbCr 4:2:0 \u2014 shembuj t\u00eb bashkimit<\/h3>\n<p>\nK\u00ebtu \u00ebsht\u00eb nj\u00eb fragment i bashkuar i nj\u00eb imazhi duke p\u00ebrdorur YCbCr 4:2:0. Vini re se ne shpenzojm\u00eb vet\u00ebm 12 bit p\u00ebr pixel.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/67e288b0a46fca88452addaef736f4cd.png\" style=\"display:block;margin: 0 auto;\" \/><\/p><\/blockquote>\n<p>K\u00ebshtu duket t\u00eb nj\u00ebjtin imazh, i koduar me llojet kryesore t\u00eb subdiscretizimit t\u00eb ngjyrave. Rreshti i par\u00eb \u00ebsht\u00eb YCbCr p\u00ebrfundimtar, rreshti i posht\u00ebm tregon rezolucionin e ngjyrave. Rezultatet jan\u00eb mjaft t\u00eb mir\u00eb, duke marr\u00eb parasysh humbjet e vogla n\u00eb cil\u00ebsi.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/fb54b6fcdbbb63cb19d19b89df9f6d85.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nKujto, ne shpall\u00ebm 278 GB hap\u00ebsir\u00eb n\u00eb disk p\u00ebr ruajtjen e nj\u00eb videoje nj\u00eb-or\u00ebshe me rezolucion 720p dhe 30 korniza n\u00eb sekond\u00eb? N\u00ebse p\u00ebrdorim YCbCr 4:2:0, at\u00ebher\u00eb kjo madh\u00ebsi do t\u00eb reduktohet n\u00eb gjysm\u00eb \u2014 139 GB. Akoma ka nj\u00eb distanc\u00eb n\u00eb rezultate t\u00eb pranueshme.<\/p>\n<p>Mund t\u00eb merrni histogramin YCbCr me ndihm\u00ebn e FFmpeg. N\u00eb k\u00ebt\u00eb imazh, e bluaja mbizot\u00ebron mbi t\u00eb kuqen, q\u00eb \u00ebsht\u00eb e dukshme n\u00eb histogram.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/6e74cb646cabc77079aea7eaee846fd1.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<blockquote>\n<h4>Ngjyra, ndri\u00e7imi, gama e ngjyrave \u2014 video p\u00ebrmbledh\u00ebse<\/h4>\n<p>\nRekomandohet t\u00eb shihni k\u00ebt\u00eb video shkat\u00ebrruese. Aty shpjegohet se \u00e7far\u00eb \u00ebsht\u00eb ndri\u00e7imi, dhe n\u00eb p\u00ebrgjith\u00ebsi shtrohen t\u00eb gjitha pyetjet mbi <i>\u00eb<\/i> ndri\u00e7imin dhe ngjyrat.<\/p>\n<p><center><div class=\"youtube-placeholder\" data-id=\"Ymt47wXUDEU\" onclick=\"loadVideo(this)\">\r\n        <img decoding=\"async\" src=\"https:\/\/img.youtube.com\/vi\/Ymt47wXUDEU\/hqdefault.jpg\" alt=\"Luaj videon\" loading=\"lazy\" width=\"480\" height=\"360\" style=\"width:100%;height:auto;\">\r\n        <div class=\"play-button\"><\/div>\r\n    <\/div><\/center><\/p><\/blockquote>\n<h2>Llojet e kornizave<\/h2>\n<p>\nLe t\u00eb vazhdojm\u00eb. N\u00eb p\u00ebrpjekje p\u00ebr t\u00eb eliminuar tepric\u00ebn n\u00eb koh\u00eb. Por fillimisht le t\u00eb p\u00ebrcaktojm\u00eb disa terminologji themelore. Le t\u00eb supozojm\u00eb se kemi nj\u00eb film me 30 korniza n\u00eb sekond\u00eb, k\u00ebtu jan\u00eb 4 kornizat e para:<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/103dc714d756d014e1d2c1bfb33751b1.png\" style=\"display:block;margin: 0 auto;\" \/> <img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/fdd7d89b884b2f77fea7c386c0d29fef.png\" style=\"display:block;margin: 0 auto;\" \/> <img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/61746b829025d5abcb7db072a54400c0.png\" style=\"display:block;margin: 0 auto;\" \/> <img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/c65ee526ec4539996f6bb94463d0cf2d.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nNe mund t\u00eb shohim shum\u00eb p\u00ebrs\u00ebritje n\u00eb korniza: p\u00ebr shembull, sfondi blu, i pandryshuar nga korniza n\u00eb korniz\u00eb. P\u00ebr t\u00eb zgjidhur k\u00ebt\u00eb problem, ne mund ta klasifikojm\u00eb ato n\u00eb m\u00ebnyr\u00eb abstrakte si tre lloje kornizash.<\/p>\n<h3>I-korniza (<b>I<\/b>ntro Frame)<\/h3>\n<p>\nI-korniza (korniza reference, korniza ky\u00e7e, korniza e brendshme) \u00ebsht\u00eb autonome. Pa marr\u00eb parasysh se \u00e7far\u00eb duhet t\u00eb vizualizohet, I-korniza \u00ebsht\u00eb, n\u00eb thelb, nj\u00eb fotografi statike. Korniza e par\u00eb zakonisht \u00ebsht\u00eb nj\u00eb I-korniz\u00eb, megjithat\u00eb ne do t\u00eb shohim rregullisht I-korniza edhe mes kornizave q\u00eb nuk jan\u00eb fare t\u00eb para.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/44f2a7d6154f1a40fdb1174a443a9c3f.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h3>P-korniza (<b>P<\/b>redicted Frame)<\/h3>\n<p>\nP-korniza (korniza e parashikuar) shfryt\u00ebzon faktin se pothuajse gjithmon\u00eb imazhi aktual mund t\u00eb riprodhohet duke p\u00ebrdorur korniz\u00ebn e m\u00ebparshme. P\u00ebr shembull, n\u00eb korniz\u00ebn e dyt\u00eb, ndryshimi i vet\u00ebm \u00ebsht\u00eb nj\u00eb top q\u00eb l\u00ebviz p\u00ebrpara. Ne mund ta marim korniz\u00ebn 2 thjesht duke modifikuar pak korniz\u00ebn 1, duke p\u00ebrdorur vet\u00ebm ndryshimin midis k\u00ebtyre dy kornizave. P\u00ebr t\u00eb nd\u00ebrtuar korniz\u00ebn 2, referohemi n\u00eb korniz\u00ebn e saj paraprake 1.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/1245857fd8406a24da02d0c71beb7b4d.png\" style=\"display:block;margin: 0 auto;\" \/> \u2190 <img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/ab8e8f6020825830c4d03004528af1a4.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h3>B-korniza (<b>B<\/b>i-prediktiv Frame)<\/h3>\n<p>\nSi p\u00ebr lidhjet jo vet\u00ebm me t\u00eb kaluar\u00ebn, por edhe me kornizat e ardhshme p\u00ebr t\u00eb siguruar nj\u00eb kompresim m\u00eb t\u00eb mir\u00eb?! Kjo \u00ebsht\u00eb, n\u00eb thelb, B-korniza (korniza me dy drejtime).<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/f28d4e02836e9b37f0f21937dd1ba660.png\" style=\"display:block;margin: 0 auto;\" \/> \u2190 <img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/7a6b3a329db155c94a91f58a99874bb9.png\" style=\"display:block;margin: 0 auto;\" \/> \u2192 <img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/09df4bc5a35df89575c7b51349be4340.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>P\u00ebrfundimi i nd\u00ebrmjet\u00ebm<\/h2>\n<p>\nK\u00ebto tipe kadrash p\u00ebrdoren p\u00ebr t\u00eb siguruar kompresionin m\u00eb t\u00eb mir\u00eb. Ne do t\u00eb shpjegojm\u00eb se si ndodh kjo n\u00eb seksionin vijues. Deri at\u00ebher\u00eb, le t\u00eb theksojm\u00eb se I-kadri \u00ebsht\u00eb m\u00eb \"i shtrenjt\u00eb\" sa i p\u00ebrket memories, P-kadri \u00ebsht\u00eb duksh\u00ebm m\u00eb i lir\u00eb, nd\u00ebrsa opsioni m\u00eb i p\u00ebrballuesh\u00ebm p\u00ebr video \u00ebsht\u00eb B-kadri.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/97b9177ffff302881deb1c86ce416166.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>T\u00eb dh\u00ebnat e tep\u00ebrta temporale (parashikimi nd\u00ebr-kadrov)<\/h2>\n<p>\nLe ta shqyrtojm\u00eb se cilat jan\u00eb mund\u00ebsit\u00eb tona p\u00ebr t\u00eb minimizuar p\u00ebrs\u00ebritjet n\u00eb koh\u00eb. Ky tip i tep\u00ebrsis\u00eb do t\u00eb zgjidhet me metoda parashikuese t\u00eb nd\u00ebrsjellta.<\/p>\n<p>Do t\u00eb mundohemi t\u00eb shpenzojm\u00eb sa m\u00eb pak bit\u00eb p\u00ebr t\u00eb koduar sekuencat e kadrave 0 dhe 1.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/f0dc2df33a5297622a77a4ca09b19af8.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nNe mund t\u00eb realizojm\u00eb <b>zbritjen<\/b>, thjesht duke zbritur kadri 1 nga kadri 0. Marrim kadri 1, duke p\u00ebrdorur diferenc\u00ebn midis tij dhe kadrin e m\u00ebparsh\u00ebm, duke koduar n\u00eb fakt vet\u00ebm mbetjen q\u00eb rezulton.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/c14981c3a3a0459a02620805c4a0f2db.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nPor \u00e7far\u00eb do t\u00eb mendoja n\u00ebse do t'ju thoja se ekziston nj\u00eb metod\u00eb akoma m\u00eb e mir\u00eb q\u00eb p\u00ebrdor edhe m\u00eb pak bit\u00eb?! Fillimisht, le t\u00eb ndajm\u00eb kadri 0 n\u00eb nj\u00eb rrjet t\u00eb qart\u00eb, p\u00ebrb\u00ebr\u00eb nga blloqe. M\u00eb pas do t\u00eb p\u00ebrpiqemi t\u00eb p\u00ebrputhim blloqet nga kadri 0 me kadri 1. Me fjal\u00eb t\u00eb tjera, t\u00eb vler\u00ebsojm\u00eb l\u00ebvizjen midis kadrave.<\/p>\n<blockquote><p> Nga Wikipedia \u2014 <b>kompensimi i l\u00ebvizjes me blloqe<\/b><\/p>\n<p>Kompensimi i l\u00ebvizjes me blloqe e ndan kadrin aktual n\u00eb blloqe jo t\u00eb mbivendosura dhe vektori i kompensimit t\u00eb l\u00ebvizjes tregon origjin\u00ebn e blloqeve (nj\u00eb keqkuptim i zakonsh\u00ebm \u00ebsht\u00eb se <i>kadri<\/i> i m\u00ebparsh\u00ebm ndahet n\u00eb blloqe t\u00eb mbivendosura, dhe vektor\u00ebt e kompensimit t\u00eb l\u00ebvizjes tregojn\u00eb se ku shkojn\u00eb k\u00ebto blloqe. N\u00eb t\u00eb v\u00ebrtet\u00eb, \u00ebsht\u00eb e kund\u00ebrta \u2014 analizohet jo kadri i m\u00ebparsh\u00ebm, por kadri i ardhsh\u00ebm, dhe zbulohet jo se ku l\u00ebvizin blloqet, por nga erdh\u00ebn ato). Zakonisht blloqet origjinale mbivendosen n\u00eb kadri origjin\u00eb. Disa algoritme t\u00eb kompresimit t\u00eb videos e nd\u00ebrrtojn\u00eb kadrin aktuel nga pjes\u00eb t\u00eb m\u00eb shum\u00eb se nj\u00eb kadri t\u00eb m\u00ebparsh\u00ebm.<\/p><\/blockquote>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/0c34e84b318be2d250bade240fad80ed.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nGjat\u00eb procesit t\u00eb vler\u00ebsimit shohim se topi u zhvendos nga (<b>x<\/b>=0, <b>y<\/b>=25) n\u00eb (<b>x<\/b>=6, <b>y<\/b>=26), vlerat <b>x<\/b> dhe <b>y<\/b> p\u00ebrcaktojn\u00eb vektorin e l\u00ebvizjes. Nj\u00eb hap tjet\u00ebr q\u00eb mund t\u00eb b\u00ebjm\u00eb p\u00ebr t\u00eb kursyer bit\u00eb \u00ebsht\u00eb t\u00eb kodojm\u00eb vet\u00ebm diferenc\u00ebn midis vektor\u00ebve t\u00eb l\u00ebvizjes midis pozita e fundit t\u00eb bllokut dhe parashikimit, k\u00ebshtu q\u00eb vektori p\u00ebrfundimtar i l\u00ebvizjes do t\u00eb jet\u00eb (x=6-0=6, y=26-25=1).<\/p>\n<p>N\u00eb nj\u00eb situat\u00eb reale, ky top do t\u00eb ishte i ndar\u00eb n\u00eb <b>n<\/b> blloqe, por kjo nuk e ndryshon kuptimin e \u00e7\u00ebshtjes.<\/p>\n<p>Objektet n\u00eb kad\u00ebr l\u00ebvizin n\u00eb tre dimensione, prandaj gjat\u00eb l\u00ebvizjes s\u00eb topit ai mund t\u00eb b\u00ebhet vizualisht m\u00eb i vog\u00ebl (o m\u00eb i madh, n\u00ebse l\u00ebviz n\u00eb drejtim t\u00eb spektatorit). \u00cbsht\u00eb normale q\u00eb t\u00eb mos ket\u00eb nj\u00eb p\u00ebrputhje perfekte midis blloqeve. K\u00ebtu \u00ebsht\u00eb nj\u00eb pamje e kombinuar e vler\u00ebsimit ton\u00eb dhe imazhit real.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/0fb4737e1076221e786fd6a78357422d.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nPor shohim q\u00eb kur aplikojm\u00eb vler\u00ebsimin e l\u00ebvizjes, t\u00eb dh\u00ebnat p\u00ebr kodim jan\u00eb duksh\u00ebm m\u00eb t\u00eb pakta se kur p\u00ebrdorim metod\u00ebn m\u00eb t\u00eb thjesht\u00eb t\u00eb llogaritjes s\u00eb diferenc\u00ebs midis kadrave.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/319507ad7197b7693efff11dcd7e4df4.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>Si do t\u00eb dukej kompensimi i l\u00ebvizjes n\u00eb praktik\u00eb<\/h2>\n<p>\nKjo metod\u00eb aplikohet menj\u00ebher\u00eb p\u00ebr t\u00eb gjith\u00eb blloqet. Shpesh, topi yn\u00eb hipotetik q\u00eb l\u00ebviz do t\u00eb ndahet menj\u00ebher\u00eb n\u00eb disa blloqe.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/978b5612dbd164d2865ccdec4474fdb4.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nMund t\u00eb provoni k\u00ebto koncepte vet\u00eb, duke p\u00ebrdorur <noindex><a rel=\"nofollow\" href=\"https:\/\/jupyter.org\/\">Jupyter<\/a><\/noindex>.<\/p>\n<p>P\u00ebr t\u00eb par\u00eb vektor\u00ebt e l\u00ebvizjes mund t\u00eb krijoni nj\u00eb video me parashikimin e jasht\u00ebm p\u00ebrmes <noindex><a rel=\"nofollow\" href=\"https:\/\/www.ffmpeg.org\/\">ffmpeg<\/a><\/noindex>.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/056d6dfd2c18baaabc70655edfe3d609.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nGjithashtu mund t\u00eb p\u00ebrdorni <noindex><a rel=\"nofollow\" href=\"https:\/\/software.intel.com\/en-us\/video-pro-analyzer\">Intel Video Pro Analyzer<\/a><\/noindex> (ai \u00ebsht\u00eb me pages\u00eb, por ka nj\u00eb version provues falas q\u00eb \u00ebsht\u00eb i kufizuar vet\u00ebm n\u00eb dhjet\u00eb kadrin e par\u00eb).<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/5e28ccc6e6101b8d613f94d326a685f2.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>T\u00eb dh\u00ebnat e tep\u00ebrta hap\u00ebsinore (parashikimi i brendsh\u00ebm)<\/h2>\n<p>\nN\u00ebse analizojm\u00eb \u00e7do kad\u00ebr n\u00eb video, do t\u00eb zbulonim nj\u00eb num\u00ebr t\u00eb madh rajonesh t\u00eb lidhura.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/24bff6d64704cf0c8e1010832ea8f6ea.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nLe t\u00eb shohim k\u00ebt\u00eb shembull. Kjo sken\u00eb p\u00ebrb\u00ebhet kryesisht nga ngjyrat blu dhe t\u00eb bardha.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/12edf221c61e064674ad363db9f3342c.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nKy \u00ebsht\u00eb nj\u00eb I-kad\u00ebr. Nuk mund t\u00eb marrim kadrin e m\u00ebparsh\u00ebm p\u00ebr parashikim, por mund ta kompresojm\u00eb. Do t\u00eb kodojm\u00eb ve\u00e7imin e bllokut t\u00eb kuq. N\u00ebse shohim fqinj\u00ebt e tij, v\u00ebm\u00eb re se rreth tij ka disa tendenca ngjyrash.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/b67b3fba3d1792db81d0f1cb52c7c29b.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nLe t\u00eb supozojm\u00eb se ngjyrat n\u00eb kad\u00ebr p\u00ebrhapen n\u00eb m\u00ebnyr\u00eb vertikale. \u00c7far\u00eb do t\u00eb thot\u00eb se ngjyrat e piksel\u00ebve t\u00eb panjohur do t\u00eb ken\u00eb vlera t\u00eb fqinj\u00ebve t\u00eb tij.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/6fe8f6ed7ebc66940fca27b8cd2c5915.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nKy parashikim ndoshta mund t\u00eb jet\u00eb i pasakt\u00eb. Pik\u00ebrisht p\u00ebr k\u00ebt\u00eb arsye \u00ebsht\u00eb e nevojshme t\u00eb aplikohet ky metod\u00eb (parashikimi i brendsh\u00ebm), dhe pastaj t\u00eb hiqen vlerat reale. Kjo do t\u00eb na jap\u00eb nj\u00eb bllok mbetje, q\u00eb do t\u00eb \u00e7onte n\u00eb nj\u00eb matrice shum\u00eb m\u00eb t\u00eb kompresuar krahasuar me origjinalin.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/52fd77c96aa8445af12fca468c72c844.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nN\u00ebse d\u00ebshoni t\u00eb praktikoni me parashikime t\u00eb brendshme, mund t\u00eb krijoni nj\u00eb video me makroblloqe dhe parashikimet e tyre me ndihm\u00ebn e ffmpeg. P\u00ebr t\u00eb kuptuar kuptimin e \u00e7do ngjyre t\u00eb bllokut do t'ju duhet t\u00eb njiheni me dokumentacionin e ffmpeg.<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/0399473c538a550f9317fd59c347a565.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nOse mund t\u00eb p\u00ebrdorni Intel Video Pro Analyzer (si\u00e7 e p\u00ebrmenda m\u00eb lart, n\u00eb versionin provues falas ka nj\u00eb kufizim p\u00ebr dhjet\u00eb kadrin e par\u00eb, por ajo do t'ju mjaftoj\u00eb p\u00ebr fillimet tuaja).<\/p>\n<p><img decoding=\"async\" alt=\"Si funksionon nj\u00eb videokodek. Pjesa 1. Bazat\" src=\"\/wp-content\/uploads\/2019\/12\/abcdf1eb4b7dbdcf2a7a64154f3052ba.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h3>Pjesa e dyt\u00eb:<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/edison\/blog\/480430\/\"> Parimet e funksionimit t\u00eb videokodekut<\/a><\/noindex><\/h3>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/edison\/blog\/481418\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c: \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u0434\u0435\u043a\u0430 \u041b\u044e\u0431\u043e\u0435 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b. \u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043e \u0446\u0432\u0435\u0442\u0430\u0445, \u0438\u0434\u0435\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u044c, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0446\u0432\u0435\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0446\u0432\u0435\u0442 \u043a\u0430\u043a \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u0442.\u043d. \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 (\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e, \u0437\u0435\u043b\u0435\u043d\u043e\u0433\u043e \u0438 \u0441\u0438\u043d\u0435\u0433\u043e), \u0432 \u043d\u0430\u0448\u0435\u0439 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-54312","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c: \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u0434\u0435\u043a\u0430 \u041b\u044e\u0431\u043e\u0435 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/news\/kak-rabotaet-videokodek-chast-1-osnovy\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u0434\u0435\u043a. \u0427\u0430\u0441\u0442\u044c 1. \u041e\u0441\u043d\u043e\u0432\u044b | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c: \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u0434\u0435\u043a\u0430 \u041b\u044e\u0431\u043e\u0435 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/news\/kak-rabotaet-videokodek-chast-1-osnovy\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-12-22T21:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-18T11:02:18+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Si funksionon videokodeku. Pjesa 1. Bazat | ProHoster","description":"Pjesa e dyt\u00eb: Parimet e funksionimit t\u00eb kodek\u00ebve t\u00eb videos \u00c7do imazh raster mund t\u00eb p\u00ebrfaq\u00ebsohet n\u00eb form\u00eb.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/news\/kak-rabotaet-videokodek-chast-1-osnovy","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u0434\u0435\u043a. \u0427\u0430\u0441\u0442\u044c 1. \u041e\u0441\u043d\u043e\u0432\u044b | ProHoster","og:description":"\u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c: \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u0434\u0435\u043a\u0430 \u041b\u044e\u0431\u043e\u0435 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435.","og:url":"https:\/\/prohoster.info\/sq\/blog\/news\/kak-rabotaet-videokodek-chast-1-osnovy","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-12-22T21:00:00+00:00","article:modified_time":"2020-02-18T11:02:18+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"54312","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-24 10:53:20","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 15:31:31","updated":"2026-01-24 10:53:20","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/54312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=54312"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/54312\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=54312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=54312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=54312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}