View Issue Details

IDProjectCategoryView StatusLast Update
0000077JVT JM H.264/AVC reference softwareencoderpublic2007-10-18 20:12
ReporterMichael Evertz Assigned ToKarsten Suehring  
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
Product VersionJM 12.4 
Fixed in VersionJM 13.0 
Summary0000077: Incorrect Stats: Stuffing Bits (no impact on compressed bitstream)
DescriptionThe encoder reports wrong amount Stuffing Bits in stats.dat when using CABAC.

stats->bit_use_stuffingBits accumulates Stuffing Bits from RD optimization
Additional InformationThe following patch should fix the problem:

Index: lencod/inc/global.h
===================================================================
155a156
> BITS_STUFFING,

Index: lencod/src/macroblock.c
===================================================================
223a224
> stats->bit_use_stuffingBits[img->type] += bitCount[BITS_STUFFING];

Index: lencod/src/biariencode.c
===================================================================
194a195
> int* bitCount = img->mb_data[img->current_mb_nr].bitcounter;
200c201
< stats->bit_use_stuffingBits[img->type]+=(5-remaining_bits);
---
> bitCount[BITS_STUFFING]+=(5-remaining_bits);
210c211
< stats->bit_use_stuffingBits[img->type]+=(13-remaining_bits);
---
> bitCount[BITS_STUFFING]+=(13-remaining_bits);
230c231
< stats->bit_use_stuffingBits[img->type]+=(21-remaining_bits);
---
> bitCount[BITS_STUFFING]+=(21-remaining_bits);
TagsNo tags attached.

Activities

Michael Evertz

2007-09-10 13:26

reporter   ~0000111

Forgot some lines which also need to be added.

Index: lencod/src/macroblock.c
===================================================================
657a659
> currMB->bitcounter[BITS_STUFFING ] = 0;

Index: lencod/src/slice.c
===================================================================
155a156
> int tmp_stuffingbits=img->mb_data[img->current_mb_nr].bitcounter[BITS_STUFFING];;
201a203,204
> stats->bit_use_stuffingBits[img->type] += img->mb_data[img->current_mb_nr].bitcounter[BITS_STUFFING] - tmp_stuffingbits;
>

Karsten Suehring

2007-10-18 20:12

administrator   ~0000124

I have merged the fix into my development tree.

Issue History

Date Modified Username Field Change
2007-09-06 14:36 Michael Evertz New Issue
2007-09-10 13:26 Michael Evertz Note Added: 0000111
2007-10-18 20:12 Karsten Suehring Status new => resolved
2007-10-18 20:12 Karsten Suehring Fixed in Version => JM 12.4-devel
2007-10-18 20:12 Karsten Suehring Resolution open => fixed
2007-10-18 20:12 Karsten Suehring Assigned To => Karsten Suehring
2007-10-18 20:12 Karsten Suehring Note Added: 0000124