slice->first_mb_in_slice = (sl->mb_y >> FIELD_OR_MBAFF_PICTURE(h)) * h->mb_width + sl->mb_x;
slice->NumMbsForSlice = 0; /* XXX it is set once we have all slices */
- slice->BitOffsetToSliceData = get_bits_count(&sl->gb);
+ slice->BitOffsetToSliceData = get_bits_count(&sl->gb) - 8;
slice->slice_type = ff_h264_get_slice_type(sl);
if (sl->slice_type_fixed)
slice->slice_type += 5;
- slice->luma_log2_weight_denom = sl->luma_log2_weight_denom;
- slice->chroma_log2_weight_denom = sl->chroma_log2_weight_denom;
+ slice->luma_log2_weight_denom = sl->pwt.luma_log2_weight_denom;
+ slice->chroma_log2_weight_denom = sl->pwt.chroma_log2_weight_denom;
if (sl->list_count > 0)
slice->num_ref_idx_l0_active_minus1 = sl->ref_count[0] - 1;
if (sl->list_count > 1)
sl->ref_list[list][i].reference == PICT_BOTTOM_FIELD);
for (plane = 0; plane < 3; plane++) {
int w, o;
- if (plane == 0 && sl->luma_weight_flag[list]) {
- w = sl->luma_weight[i][list][0];
- o = sl->luma_weight[i][list][1];
- } else if (plane >= 1 && sl->chroma_weight_flag[list]) {
- w = sl->chroma_weight[i][list][plane-1][0];
- o = sl->chroma_weight[i][list][plane-1][1];
+ if (plane == 0 && sl->pwt.luma_weight_flag[list]) {
+ w = sl->pwt.luma_weight[i][list][0];
+ o = sl->pwt.luma_weight[i][list][1];
+ } else if (plane >= 1 && sl->pwt.chroma_weight_flag[list]) {
+ w = sl->pwt.chroma_weight[i][list][plane-1][0];
+ o = sl->pwt.chroma_weight[i][list][plane-1][1];
} else {
- w = 1 << (plane == 0 ? sl->luma_log2_weight_denom :
- sl->chroma_log2_weight_denom);
+ w = 1 << (plane == 0 ? sl->pwt.luma_log2_weight_denom :
+ sl->pwt.chroma_log2_weight_denom);
o = 0;
}
slice->Weights[list][i][plane][0] = w;