Passa ai contenuti principali

chroma subsampling

http://en.wikipedia.org/wiki/Chroma_subsampling:

Sampling systems and ratios

The subsampling scheme is commonly expressed as a three part ratio (e.g. 4:2:2), although sometimes expressed as four parts (e.g. 4:2:2:4). The parts are (in their respective order):

  • Luma horizontal sampling reference (originally, as a multiple of 3.579 MHz in the NTSC television system)
  • Cr horizontal factor (relative to first digit)
  • Cb horizontal factor (relative to first digit), except when zero. Zero indicates that Cb horizontal factor is equal to second digit, and, in addition, both Cr and Cb are subsampled 2:1 vertically. Zero is chosen for the bandwidth calculation formula (see below) to remain correct.
  • Alpha horizontal factor (relative to first digit). May be omitted if alpha component is not present.

To calculate required bandwidth factor relative to 4:4:4 (or 4:4:4:4), one needs to sum all the factors and divide the result by 12 (or 16, if alpha is present).

From Microsoft Help

  • 4:4:4 means no downsampling of the chroma channels.
  • 4:2:2 means 2:1 horizontal downsampling, with no vertical downsampling. Every scan line contains four Y samples for every two U or V samples.
  • 4:2:0 means 2:1 horizontal downsampling, with 2:1 vertical downsampling.
  • 4:1:1 means 4:1 horizontal downsampling, with no vertical downsampling. Every scan line contains four Y samples for every U or V sample. 4:1:1 sampling is less common than other formats, and is not discussed in detail in this article.
esempio di visualizzazione: http://msdn2.microsoft.com/en-us/library/ms867704.aspx

Video subtype (i codici four cc più famosi per il video non compresso):
AYUV 4:4:4
YUY2 4:2:2
UYVY 4:2:2
YV12 4:2:0

Video di esempio

http://trace.eas.asu.edu/yuv/index.html

RGB formats

rgb24 un byte per colore (8bit*3 per ogni pixel)
rgb555 5 bit per ogni colore (5bit*3 per ogni pixel messi su due byte) 32K colori
rgb565 6 bit solo per il verde (5bit*2 + 6, messi su due byte) 65K colori

Commenti

Post popolari in questo blog

Log.Net: Conflitto Con CrystalReport per Visual Studio 2010

Situazione: Web Application Asp.Net 4.0, Utilizzo delle librerie di Crystal Report per VS2010. Il progetto web utilizza Log.Net, scaricato dal sito ufficiale. Un problema simile si verifica con applicazioni Windows Form. Problema: Le due librerie vanno in conflitto sia in fase di compilazione ( 1550854 - "Could not load file or assembly 'log4net' or one of its dependencies" Error when building Visual Studio 2010 solution utilizing the Crystal Reports .NET Runtime ), sia una volta installata sulla macchiana target (L'inizializzatore di tipo di 'CrystalDecisions.Shared.SharedUtils' ha generato un'eccezione. Impossibile caricare il file o l'assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' o una delle relative dipendenze. La definizione di manifesto dell'assembly specificato non corrisponde al riferimento all'assembly.). Soluzione Spiegata: Il thread in cui ne parlano. A quanto ho ca...

Dotnetnuke non migrerà ad asp .NET MVC

Il grande capo di dnn Shawn Walker ha messo in chiaro che non tenteranno un porting di dnn verso asp .Net MVC, dotnetnuke resterà per sempre su web forms. La scelta è tanto saggia quanto obbligata. Esiste però un modo per estendere DNN o integrarlo con un'applicazione MVC? sembra di si, il completo tutorial in 3 parti direttamnte dai blog ufficiali delgi sviluppatori Dnn: parte1 parte2 parte3 Per completezza qui il famoso post di ScottGu sulla volontà di microsoft di tenere in piedi con uguali risorse sia asp.Net MVC sia WebForms.

Xamarin Forms Image: where to put images in projects (root directory in WindosPhone)

We have a PCL Xamarin.Forms project with some XAML. Images are project-specific so we put the image in the starting projec (i.e. Wp and Android) We want to define image name in the XAML so we use: x:Name="myImage"  Source="NavigationLeft.png" Android takes the "NavigationLeft.png" in the Resources/Drawable WindowsPhone takes the "NavigationLeft.png" on the root of the project. So Windows phone project get messed with resource images in the root folder. Is there a way to avoid this? No, there's not: in Windows Phone  we could place the image in an "Images" forder and reference it with "Images/NavigationLeft.png" in XAML, this would work. But in Android the Resource/drawable directory is a flat diretory and does allow subdirs. For now i prefixed share image with an x "xNavigationLeft". Sources: Android drawable does not allow subdirs For Wp using Xamarin.Forms we must put images on root dir