Introduction
Here is a brief introduction to the procedures of the codecs JPEG, MPEG-4, H.264, and H.265:
- JPEG: JPEG is a lossy compression algorithm that is commonly used for images. The JPEG compression process works by dividing the image into small blocks of pixels and then using a mathematical algorithm to reduce the number of bits needed to represent each block. The more compression that is applied, the lower the quality of the image will be.
- MPEG-4: MPEG-4 is a family of video compression standards that are commonly used for streaming and downloading video. MPEG-4 compression works by dividing the video into small frames and then using a mathematical algorithm to reduce the number of bits needed to represent each frame. The more compression that is applied, the lower the quality of the video will be.
- H.264: H.264 is a video compression standard that is commonly used for high-definition video. H.264 compression works by dividing the video into small frames and then using a mathematical algorithm to reduce the number of bits needed to represent each frame. H.264 is more efficient than MPEG-4, so it can achieve higher quality video with the same amount of compression.
- H.265: H.265 is a video compression standard that is even more efficient than H.264. H.265 can achieve even higher quality video with the same amount of compression.
- YUV: YUV is a color space that is commonly used for video. YUV is a three-component color space, with the Y component representing the brightness, the U component representing the blue-luminance, and the V component representing the red-luminance.
- Raw: Raw is a format that stores image data without any compression. Raw images are typically larger than compressed images, but they offer the best possible image quality.
JPEG:
- The image is divided into 8x8 blocks of pixels.
- Each block is converted to a frequency domain using a discrete cosine transform (DCT).
- The DCT coefficients are quantized, which means that they are rounded to a certain number of bits.
- The quantized coefficients are then encoded using a lossless compression algorithm, such as Huffman coding.
- The encoded coefficients are stored in a file.
MPEG-4:
- The video is divided into frames.
- Each frame is divided into smaller blocks of pixels.
- Each block is converted to a frequency domain using a discrete cosine transform (DCT).
- The DCT coefficients are quantized, which means that they are rounded to a certain number of bits.
- The quantized coefficients are then encoded using a lossy compression algorithm, such as a variable length coding (VLC) algorithm.
- The encoded coefficients are stored in a file.
H.264:
- The video is divided into frames.
- Each frame is divided into smaller blocks of pixels.
- Each block is converted to a frequency domain using a discrete cosine transform (DCT).
- The DCT coefficients are quantized, which means that they are rounded to a certain number of bits.
- The quantized coefficients are then encoded using a lossy compression algorithm, such as a context-adaptive variable length coding (CAVLC) algorithm.
- The encoded coefficients are stored in a file.
H.265:
- The video is divided into frames.
- Each frame is divided into smaller blocks of pixels.
- Each block is converted to a frequency domain using a discrete cosine transform (DCT).
- The DCT coefficients are quantized, which means that they are rounded to a certain number of bits.
- The quantized coefficients are then encoded using a lossy compression algorithm, such as a range-adaptive hybrid coding (RACH) algorithm.
- The encoded coefficients are stored in a file.
YUV:
- The image is divided into three channels: Y, U, and V.
- Each channel is then converted to a range of values between 0 and 255.
- The channels are then stored in a file.
Raw:
- The image data is stored without any compression.
- The image data is then stored in a file.