
DC prediction is taken from the previous block of the same coefficient, and restarts at 1024 for each new macroblock row (not 128 as in MPEG-2). DC coefficients are coded exactly as in MPEG-2 (same luma/chroma tables, same scheme for storing the coefficient and sign). 4:2:0 is coded YYYY UV.īlocks are coded with static VLCs. 4:2:2 is coded YYYY UV UV (chroma is top, then bottom).


4:4:4 is coded YYYY UV UV UV UV (chroma is top-left, bottom-left, top-right, bottom-right). Luma is coded top-left, top-right, bottom-left, bottom-right. The next slice starts on the byte immediately after the end of the previous one, as given by the length (this might mean skipping 1–7 bits).īlocks are 8x8 pixels, and macroblocks are 16x16 pixels. The first three bytes of each slice form a length of the slice in bytes (including the three length bytes). (Exception: NDI can send a frame consisting of a single field, with the second field offset equal to 4, ie., exactly overlapping with the first field.) Quantizer is 100 - quality.Įach field is split into four slices that can be independently decoded each slice codes 16 lines, then skip 48 lines (coded by the other three slices), code 16 more lines, and so on until at the bottom of the field, which implicitly ends the slice. NewTek's NDI network codec uses SHQ2 and SHQ7.įrame is always coded as two fields, data is packed into 32-bit little-endian words and is read from LSB.įirst byte is quality, next three bytes form an offset to the second field. SHQ7 is 422 with alpha coded the same way as luma.SHQ4/ SHQ5 are 4:4:4 with/without alpha.SHQ2/ SHQ3 are 4:2:2 with/without alpha.SHQ0/ SHQ1 are 4:2:0 with/without alpha.It is generally very similar to MPEG-2 intraframe.

This is a simple intermediate codec with different subsampling and alpha support.
