33 for (i = 0; i < current->Nf; i++) {
37 us(8, Tq[i], i, 0, 3);
52 for (i = 0; i < 64; i++)
53 us(16, Q[i], i, 1, 255);
55 for (i = 0; i < 64; i++)
56 us(8, Q[i], i, 1, 255);
67 HEADER(
"Quantisation Tables");
69 u(16, Lq, 2, 2 + 4 * 65);
72 for (i = 0; i <
n; i++)
86 for (i = 0; i < 16; i++)
87 us(8,
L[i], i, 0, 224);
90 for (i = 0; i < 16; i++) {
91 for (j = 0; j < current->L[i]; j++) {
92 us(8,
V[ij], ij, 0, 255);
107 u(16, Lh, 2, 2 + 8 * (1 + 16 + 256));
110 for (i = 0; n < current->Lh; i++) {
114 for (j = 0; j < 16; j++)
115 n += 1 + current->table[i].L[j];
131 for (j = 0; j < current->Ns; j++) {
133 us(4, Td[j], j, 0, 3);
134 us(4, Ta[j], j, 0, 3);
150 HEADER(
"Application Data");
154 if (current->Lp > 2) {
157 if (!current->Ap_ref)
159 current->Ap = current->Ap_ref->data;
162 for (i = 0; i < current->Lp - 2; i++)
163 us(8, Ap[i], i, 0, 255);
178 if (current->Lc > 2) {
181 if (!current->Cm_ref)
183 current->Cm = current->Cm_ref->data;
186 for (i = 0; i < current->Lc - 2; i++)
187 us(8, Cm[i], i, 0, 255);
static int FUNC() dqt(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawQuantisationTableSpecification *current)
#define us(width, name, range_min, range_max, subs,...)
static int FUNC() huffman_table(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawHuffmanTable *current)
#define u(width, name, range_min, range_max)
static int FUNC() scan_header(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawScanHeader *current)
CHECK(-1) CHECK(-2)}}}}CHECK(1) CHECK(2)}}}}}if(diff0+diff1 > 0) temp-
static int FUNC() dht(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawHuffmanTableSpecification *current)
static int FUNC() comment(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawComment *current)
AVBufferRef * av_buffer_alloc(int size)
Allocate an AVBuffer of the given size using av_malloc().
Context structure for coded bitstream operations.
static int FUNC() application_data(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawApplicationData *current)
static int FUNC() quantisation_table(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawQuantisationTable *current)