assert(pic_param->num_components <= 3);
for (index = 0; index < pic_param->num_components; index++) {
- int qm_type = va_to_gen7_jpeg_qm[pic_param->components[index].component_id];
+ int qm_type = va_to_gen7_jpeg_qm[pic_param->components[index].component_id - pic_param->components[0].component_id + VA_JPEG_COMPONENT_ID_Y];
unsigned char *qm = iq_matrix->quantiser_matrix[pic_param->components[index].quantiser_table_selector];
int precision = iq_matrix->precision[pic_param->components[index].quantiser_table_selector];
unsigned char raster_qm[64];
int j;
- assert(pic_param->components[index].component_id >= VA_JPEG_COMPONENT_ID_Y &&
- pic_param->components[index].component_id <= VA_JPEG_COMPONENT_ID_A);
assert(precision == 0);
for (j = 0; j < 64; j++)
assert(slice_param->num_components <= pic_param->num_components);
for (i = 0; i < slice_param->num_components; i++) {
- switch (slice_param->components[i].component_id) {
+ switch (slice_param->components[i].component_id - pic_param->components[0].component_id + VA_JPEG_COMPONENT_ID_Y) {
case VA_JPEG_COMPONENT_ID_Y:
scan_component_mask |= (1 << 0);
break;