Problems editing a ts with non-standard crop values

The world's first H.264 AVCHD accurate cutter without re-encoding!
Smart Cutter and Mate for DV and DVB.
Smart products manages, splits, joins movies from DV Camcorder and DVB HD PVR.
Post Reply
wavelet
Posts: 31
Joined: Fri Nov 19, 2010 10:42 am

Problems editing a ts with non-standard crop values

Post 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".
Post Reply