Quantizer

divider module

This module contains the HDL for divider used for Quantiser

jpegenc.subblocks.quantizer.divider.divider

This module contains the HDL implementation

jpegenc.subblocks.quantizer.divider.divider_ref(dividend, divisor)

software implementation of divider

quant_rom module

MyHDL implementation of Quantiser ROM

jpegenc.subblocks.quantizer.quant_rom.build_huffman_rom_tables(csvfile)

build huffman tables

jpegenc.subblocks.quantizer.quant_rom.quant_rom

Build Chrominance ROM for Huffman Tables

quantizer module

The above module is the hardware implementation of quantizer top module

class jpegenc.subblocks.quantizer.quantizer.QuantCtrl

Bases: object

Control Signals used for quantizer top module

start : signal used to start the processing of block ready : asserts when block is ready to take next input color_components : select Y1 or Y2 or Cb or Cr component

class jpegenc.subblocks.quantizer.quantizer.QuantIODataStream(width_data=12, width_addr=6)

Bases: object

Input datastream into the Quantizer top module

data_in : send input data into the module read_addr : read the data from the input buffer

jpegenc.subblocks.quantizer.quantizer.quantizer

The Quantizer module divides the input data and data in the ROM

Arguments: quanti_datastream : Input datastream to the module quant_ctrl : control signals to the module

Returns: quanto_datastream : Output datastream from the module

quantizer_core module

The above module is the hardware implementation of quantizer core module

class jpegenc.subblocks.quantizer.quantizer_core.QuantDataStream(width_data=12)

Bases: object

Input interface for core module

data : input data to the quantizer core module valid : asserts when input data is valid

jpegenc.subblocks.quantizer.quantizer_core.quantizer_core

This Module is the core of the Quantizer

Arguments: quant_input_stream : Input stream to the core module color_component : used to select specific quantizer tables

Returns: quant_output_stream : Output data stream from the Quantizer

ramz module

This ram is used to store quantization values

jpegenc.subblocks.quantizer.ramz.ramz

default addr width 6, data width 12

romr module

This module generates reciprocals for numbers 0-255

jpegenc.subblocks.quantizer.romr.romr

Reciprocals of numbers are generated for quantizer core