Wednesday, September 26, 2012

Bits vs. Bytes

BIT

In computing a bit refers to a binary state of 0 or 1, information processed by an electrical circuit flipping between on/off states. Bits were first used to record data in 1725 by Basile Bouchon and Jean-Baptiste Falcon. They invented the punch card as a more robust form of the perforated paper rolls then in use for controlling textile looms in France. This technique was greatly improved by Joseph Marie Jacquard for his Jacquard loom in 1801.

BYTE

The byte is a unit of digital information in computing that consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer. The standard of eight bits is a convenient power of two permitting the values 0 through 255 for one byte. It is also the standard unit used to render the 256 levels of color in 8-bit computer graphics, such as the "sprite" objects for Nintendo's NES gaming console released in 1985. In modern YUV 4:4:4 video, each 8-bit channel (24 bits per pixel) defines a digital color space in terms of one luma (Y) and two chroma (UV) samples.

USAGE

8 bits = 1 byte

KB (uppercase "B") refers to kilobytes @ 1024 KB = 1 MB
MB (uppercase "B") refers to megabytes @ 1024 MB = 1 GB
GB (uppercase "B") refers to gigabytes @ 1024 GB = 1 TB

kbps (lowercase "b") refers to kilobits per second @ 1024 kbps = 1 mpbs
mbps (lowercase "b") refers to megabits per second @ 1024 mbps = 1 gbps
gbps (lowercase "b") refers to gigabits per second @ 1024 gbps = 1 tbps

EDIT "LOSSLESS" CODECS

Generally video codecs fall into two categories. Professional edit codecs are designed to be high bitrate (25 mbps ~ 250 mbps), preserving image quality thru multiple generations of editing, compositing, and color correction. "Lossless" is a relative term, since these are mostly compressed YUV 4:4:4 color spaces. (See PSNR) Also, many professional cameras and codecs use YUV 4:2:2 to cut chroma sampling in half.

Avid DNxHD @ 36 ~ 220 mbps (270 ~ 1650 MB/minute)
Apple ProResHD @ 50 ~ 250 mbps (375 ~ 1875 MB/minute)
Apple Animation (32-bit RLE) @ 90 ~ 320 mbps (675 ~ 2400 MB/minute)
Sony HDCAM @ 135 mbps (1012 MB/minute)
Sony XDCAM @ 18 ~ 50 mbps (135 ~ 375 MB/minute)
Panasonic DVCProHD @ 40 mbps ~ 110 mbps (300 ~ 825 MB/minute)
REDcode @ 80mbps ~ 336 mbps (600 ~ 2520 MB/minute)
8-bit Uncompressed 720p30 4:2:2 @ 442 mbps (3315 MB/minute)
10-bit Uncompressed 1080p30 4:4:4 @ 1866 mbps (14000 MB/minute)

Sample math:
30 bits/pixel x 1920 x 1080 = 62208000 bits per frame
62.208 megabits/frame x 30 frames = 1866.24 mbps

DELIVERY "LOSSY" CODECS

Delivery codecs are typically used once all post production is complete, and a deliverable is needed for VOD streaming playback to mobiles, web browsers, cable, DVD, BluRay, and DVRs. They are very lossy and low bitrate (300kbps ~ 6 mbps). Color space is usually constrained to YUV 4:2:0 subsampling, since it will no longer be manipulated, and only needs to be viewed by the human eyeball.

MP4 H.264/AVC is the delivery codec used for modern video applications. It is decoded with hardware in just about every video device made today, from phones to HD televisions. It is transported in an MP4 (.mp4) file container, and may be embedded using HTML5, Flash, or Java players. Common H.264 streaming video targets include:

LD 240p 3G Mobile @ H.264 baseline profile 350 kbps (3 MB/minute)
LD 360p 4G Mobile @ H.264 main profile 700 kbps (6 MB/minute)
SD 480p WiFi @ H.264 main profile 1200 kbps (10 MB/minute)
HD 720p @ H.264 high profile 2500 kbps (20 MB/minute)
HD 1080p @ H.264 high profile 5000 kbps (35 MB/minute)

H.264 FRAMESIZE - square pixel examples
4:3 (1.33) standard: 320x240, 384x288, 480x360, 576x432, 640x480, 768x576
16:9 (1.77) widescreen: 432x240, 512x288, 640x360, 768x432, 854x480, 1024x576, 1280x720, 1920x1080

H.264 PROFILE - based on vertical resolution "p" value
Baseline - for low definition (LD) 240p to 288p, compatible with older 3G mobiles
Main - for standard definition (SD) 360p to 480p, good for 4G smartphones and tablets
High - for high definition (HD) 720p to 1080p, best quality for hardware with a good decoder

THE HUMAN EYE

The human eye contains two major types of light-sensitive photoreceptor cells used for vision. There are an average of 90 million rods and 4.5 million cones in the human retina.

Rod cells detect luminance (brightness). They are responsible for low-light (scotopic) and monochrome (black-and-white) vision. Rod density is greater in the peripheral retina.

Cone cells detect chrominance (color), and they require brighter light than rods to function. In humans, there are three types of cones, maximally sensitive to long-wavelength "red" (564 nm ~ 580 nm), medium-wavelength "green" (534 nm ~ 545 nm), and short-wavelength "blue" (420 nm ~ 440 nm) light. Cones are mostly concentrated in and near the fovea. Only a few are present at the sides of the retina.

Tuesday, September 25, 2012

I am the Web Guy



A pee eye says what? YARRRRRRR!!!!! MEGATRON!!!!!