# HG changeset patch # User gb # Date 1267694059 0 # Node ID 471c370c6b05621176606de3daa5394763187aa2 # Parent a1376a6f9af15c4b207f9d102c7905c29d30360a Cope with rev 22183: Reorder indexes in weight tables. diff -r a1376a6f9af1 -r 471c370c6b05 vaapi_h264.c --- a/vaapi_h264.c Thu Mar 04 04:58:43 2010 +0000 +++ b/vaapi_h264.c Thu Mar 04 09:14:19 2010 +0000 @@ -198,16 +198,16 @@ /* VA API also wants the inferred (default) values, not only what is available in the bitstream (7.4.3.2). */ if (h->luma_weight_flag[list]) { - luma_weight[i] = h->luma_weight[list][i][0]; - luma_offset[i] = h->luma_weight[list][i][1]; + luma_weight[i] = h->luma_weight[i][list][0]; + luma_offset[i] = h->luma_weight[i][list][1]; } else { luma_weight[i] = 1 << h->luma_log2_weight_denom; luma_offset[i] = 0; } for (j = 0; j < 2; j++) { if (h->chroma_weight_flag[list]) { - chroma_weight[i][j] = h->chroma_weight[list][i][j][0]; - chroma_offset[i][j] = h->chroma_weight[list][i][j][1]; + chroma_weight[i][j] = h->chroma_weight[i][list][j][0]; + chroma_offset[i][j] = h->chroma_weight[i][list][j][1]; } else { chroma_weight[i][j] = 1 << h->chroma_log2_weight_denom; chroma_offset[i][j] = 0;