Page 1 of 1

Problems editing a ts with non-standard crop values

Posted: Sun Aug 05, 2012 7:28 pm
by wavelet
Please refer to the samples crop_clip.ts and crop_clip_trimmed.ts in the wavelet sub-directory of the ftp site.

crop_clip.ts has been coded a bit unusually. Each frame is 1280x736 but then frame_crop_bottom_offset has been set to 4 in the SPS (meaning 16 pixels because of the chroma sub-sampling) so that the resulting displayed frame size is 1280x720. I don't know why anyone would use crop values outside the range 0-15 pixels but it's legal H.264.

Anyway, if I load this into Smart Cutter and extract a portion of the clip (file crop_clip_trimmed.ts), the result is corrupt:
- The first frame has frame_crop_bottom_offset=3 (12 pixels) in the active SPS. It changes back to 4 in subsequent frames.
- When I analyze the 2nd frame in an H.264 tool, it gives the error "RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture', invalid bitstream".