View Issue Details

IDProjectCategoryView StatusLast Update
0000107JVT JM H.264/AVC reference softwareencoderpublic2008-05-07 12:43
ReporterChristian Schmidt Assigned ToKarsten Suehring  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionJM 13.2 
Fixed in VersionJM-14.1 
Summary0000107: Bits per picture calculation broken for multiple slices and/or data partitioning (breaks RD picture coding)
DescriptionCalculation of the # bits per coded frame/field only works correctly for single slices,
and with data partitioning disabled:

image.c :: frame_picture()
{
...
frame->bits_per_picture = 8 * ((((img->currentSlice)->partArr[0]).bitstream)->byte_pos);
}

image.c :: field_picture()
{
...
top->bits_per_picture = 8 * ((((img->currentSlice)->partArr[0]).bitstream)->byte_pos);
...
bottom->bits_per_picture = 8 * ((((img->currentSlice)->partArr[0]).bitstream)->byte_pos);
}


As a result, RD picture coding (for frames) is broken when using multiple slices (e.g. SliceMode=2).
ASFAIK, this does not affect rate control.


Suggested fix (frame case):
  {
    int i, j;

    frame->bits_per_picture = 0;
    
    for ( i = 0; i < frame->no_slices; i++ )
    {
        Slice *thisSlice = frame->slices[i];
        
        for ( j = 0; j < thisSlice->max_part_nr; j++ )
            frame->bits_per_picture += 8 * ((thisSlice->partArr[j]).bitstream)->byte_pos;
    }
  }

TagsNo tags attached.

Activities

Karsten Suehring

2008-05-07 12:43

administrator   ~0000182

Fixed according to suggested solution

Issue History

Date Modified Username Field Change
2008-04-11 22:37 Christian Schmidt New Issue
2008-05-07 12:43 Karsten Suehring Status new => resolved
2008-05-07 12:43 Karsten Suehring Fixed in Version => JM-14.0-dev
2008-05-07 12:43 Karsten Suehring Resolution open => fixed
2008-05-07 12:43 Karsten Suehring Assigned To => Karsten Suehring
2008-05-07 12:43 Karsten Suehring Note Added: 0000182