From: Paul J. T. <pta...@ci...> - 2013-10-28 15:11:34
|
I've run into two bugs. The first causes Segmentation Faults when reading video frames with the native color model after reading frames from the same file with a different color model. lines 372 & 373 of codecs.c should be: file->vtracks[track].io_row_span = file->vtracks[track].stream_row_span; file->vtracks[track].io_row_span_uv = file->vtracks[track].stream_row_span_uv; The current version has those assignments reversed and changes the rowspan for the native color model to the last color model used. The other bug miscalculates the space needed for the uv planes: Line 495 of color.c should be: uv_size = rowspan_uv * ((height + sub_v - 1)/sub_v); not: uv_size = (rowspan_uv * ((height + sub_v - 1))/sub_v; Doing the integer division after the multiplication makes the uv_size a half a line too large. The addition of sub_v - 1 to the height is to force rounding up if the height of the frame is an odd number and sub_v = 2. By multiplying the (height +1) by the rowspan_uv before dividing by 2, integer truncation does not work. I can provide this in patch format if needed. |