Changed the behaviour of removing the aspect ratio information from h.264 bitstreams to keeping it.

The new option "--engage remove_bitstream_ar_info" restores the previous behaviour.
This commit is contained in:
Moritz Bunkus 2009-04-08 16:47:10 +02:00
parent fff0804b59
commit c9981c75e5
8 changed files with 690 additions and 668 deletions

View File

@ -1,5 +1,11 @@
2009-04-08 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: By default mkvmerge keeps the aspect ratio information
in AVC/h.264 video bitstreams now (equivalent to specifying
"--engage keep_bitstream_ar_info" in earlier versions). A new
option "--engage remove_bitstream_ar_info" is available that
restores the previous behaviour.
* mkvmerge: bug fix: Fixed the aspect ratio extraction for
AVC/h.264 video by adding three more pre-defined sample aspect
ratios. Mkvmerge also only assumes "free aspect ratio" if the

662
po/de.po

File diff suppressed because it is too large Load Diff

659
po/ja.po

File diff suppressed because it is too large Load Diff

View File

@ -43,9 +43,10 @@ static const struct {
{ ENGAGE_USE_CODEC_STATE, "use_codec_state" },
{ ENGAGE_ENABLE_TIMECODE_WARNING, "enable_timecode_warning" },
{ ENGAGE_MERGE_TRUEHD_FRAMES, "merge_truehd_frames" },
{ ENGAGE_REMOVE_BITSTREAM_AR_INFO, "remove_bitstream_ar_info" },
{ 0, NULL },
};
static std::vector<bool> s_engaged_hacks(ENGAGE_ENABLE_TIMECODE_WARNING + 1, false);
static std::vector<bool> s_engaged_hacks(ENGAGE_MAX_IDX + 1, false);
bool
hack_engaged(unsigned int id) {

View File

@ -37,6 +37,8 @@
#define ENGAGE_USE_CODEC_STATE 14
#define ENGAGE_ENABLE_TIMECODE_WARNING 15
#define ENGAGE_MERGE_TRUEHD_FRAMES 16
#define ENGAGE_REMOVE_BITSTREAM_AR_INFO 17
#define ENGAGE_MAX_IDX ENGAGE_REMOVE_BITSTREAM_AR_INFO
void MTX_DLL_API engage_hacks(const std::string &hacks);
bool MTX_DLL_API hack_engaged(unsigned int id);

View File

@ -550,7 +550,7 @@ mpeg4::p10::parse_sps(memory_cptr &buffer,
bit_writer_c w(newsps, size);
int i, nref, mb_width, mb_height;
keep_ar_info |= hack_engaged(ENGAGE_KEEP_BITSTREAM_AR_INFO);
keep_ar_info = !hack_engaged(ENGAGE_REMOVE_BITSTREAM_AR_INFO);
memset(&sps, 0, sizeof(sps));

View File

@ -213,9 +213,9 @@ cli_options_dlg::init_cli_option_list() {
Z("Use the old AAC codec IDs (e.g. 'A_AAC/MPEG4/SBR') instead of the new one ('A_AAC').")));
all_cli_options.push_back(cli_option_t(wxU("--engage use_codec_state"),
Z("Allows the use of the CodecState element. This is used for e.g. MPEG-1/-2 video tracks for storing the sequence headers.")));
all_cli_options.push_back(cli_option_t(wxU("--engage keep_bitstream_ar_info"),
Z("Normally mkvmerge removes aspect ratio information from MPEG4 video bitstreams and puts the information into the container. "
"This option lets mkvmerge keep the aspect ratio information in the bitstream.")));
all_cli_options.push_back(cli_option_t(wxU("--engage remove_bitstream_ar_info"),
Z("Normally mkvmerge keeps aspect ratio information in MPEG4 video bitstreams and puts the information into the container. "
"This option causes mkvmerge to remove the aspect ratio information from the bitstream.")));
all_cli_options.push_back(cli_option_t(wxU("--engage merge_truehd_frames"),
Z("TrueHD audio streams know two frame types: sync frames and non-sync frames. With this switch mkvmerge will put one sync frame "
"and all following non-sync frames into a single Matroska block. Without it each non-sync frame is put into its own Matroska block.")));

View File

@ -48,8 +48,8 @@ T_049ass:b50e8bc1d9acbe0a5a940e18e4b33cde:passed:20040929-113852
T_050X_ass:6aeb4aef55511282630e9f0e69777c46-d65638e96a393b01deb6d5e132d35552:passed:20040929-113852
T_051ogm:6de71dc2fcde3ae4ddeaed7debf0bab0:passed:20071223-112225
T_200mp2_from_mp4:4e8078c1fbe5ec97a3a74e1f5aeb255a:passed:20040917-185156
T_201avc_from_mp4_with_par:6c7940e2a22ceeb41599880a8499ab8a:passed:20050125-224528
T_202avc_from_mp4_with_par_bframes:646322197912c18bbeeaec2b6bcdb781:passed:20050125-224635
T_201avc_from_mp4_with_par:e01a4cdedc0b51b25bfb49ab85d316d8:passed:20050125-224528
T_202avc_from_mp4_with_par_bframes:b4947b1fe585e7a9a587e47e657aa242:passed:20050125-224635
T_203wavpack_with_correctiondata:a375abc2174544fda652ec9ea0bffd61:passed:20050201-094411
T_204wavpack_without_correctiondata:58e1c78c7a26d67af71845754519c652:passed:20050201-094414
T_205X_cuesheets:3b00b00c7d185137e30d7e95e3123d33-b3bb67d316e20da12926d5c1d628f6e5:passed:20050210-211853
@ -58,7 +58,7 @@ T_207segmentinfo:824963a25737f7785a7dc2ff13febd27:passed:20050211-234856
T_208cat_and_splitting:f91e9554e8a2919c5df10b653ba787a5-fdee1b882a4e59d5de2a7bbfd6efa223:passed:20050306-152640
T_209ac3misdeetected_as_mpeges:7a0a91f18dea69ea2a43774098f5d472:passed:20050315-092851
T_210splitting_and_chapters:1a8f6844f5912334d5ed3c329f8e0662-cd88146c6b77b9a2bfa370ac11c15997-a1bd93f44ca199aee4e44c0632d0733f-fc3d1279de973c724dc3ed946358cd54:passed:20050406-165104
T_211bug_segfault_reading_mp4:5f964febad52ab1df8946070ecd5d2c8:passed:20050728-083402
T_211bug_segfault_reading_mp4:81db468f258a044a822ebb9d43dd0db8:passed:20050728-083402
T_212ssa_attachments:7555c28c8b18536880248bb88253fa49-9a5a5ed80808c9d448ca5b44b640d8aa-c9a562c38a809df96ba6bd78220bb930-6ee73fb6f296ec5a9d9322c8ec556bc3-cadf6d54ff0e53f2fa363b4042d2be2a:passed:20050824-131320
T_213mp4_broken_pixel_dimensions:7ab75859530a5df62365803c1f5040dd:passed:20050919-094831
T_214one_frame_avi:bea975277e91ded1a4085043e89608ce:passed:20051004-192755
@ -73,15 +73,15 @@ T_222stereo_mode:22eebd6bda7d848379044be8d9d8f440-38a1988c087c40e6e52025bb974f2c
T_223ra_cook_keyframes:9586107c7cf22c7fe4e3a3513f8da68d:passed:20061228-150947
T_224dts:9041c8a672de2e8d24bbf74e51a706fb-34450bba1e132350d63daebbda2fd2a7:passed:20070206-174735
T_225dts_in_wav:efc93fe04e25c0b9ae26077b08dd8745-23b8b39884f4a4012fa5e39b70ef054e:passed:20070206-174726
T_226h264:d4f91974c45f08ae697f872f970d7c44:passed:20070208-103558
T_227h264_with_garbage:832021cdd448f3c0703609218c43641b:passed:20070208-103656
T_228h264_no_idr_slices:6c734c225a3ee5fa2fe2c558e03a677c:passed:20070426-103130
T_226h264:6ed11748e12ac6758ba26f807f38f553:passed:20070208-103558
T_227h264_with_garbage:107251f4b63d8d07057f4349d35b1423:passed:20070208-103656
T_228h264_no_idr_slices:e20d0d3d8b3fecd6b02bbc6bb03e5b00:passed:20070426-103130
T_229rav3_in_rm:afe8fabeb8f8d74f29a5116b731c3262:passed:20070619-220659
T_230h264_nalu_size_len_change:5edd20bc714e136b1b09c0d518688f03-646322197912c18bbeeaec2b6bcdb781:passed:20070622-103843
T_230h264_nalu_size_len_change:6c5a7849dc84567e35f234ddce3ec409-b4947b1fe585e7a9a587e47e657aa242:passed:20070622-103843
T_231X_ac3_header_removal:6ca341797c5f93e273c8502f4d6f4fba:passed:20070623-111240
T_232h264_changing_sps_pps:e3c2583388a2178a2b9f706cc96cd82b:passed:20070815-211934
T_232h264_changing_sps_pps:c3acc99db4eaa8840501b7d29e012fed:passed:20070815-211934
T_233srt_with_coordinates:ecb701d64b3073d99295e9e160761962:passed:20070819-203105
T_234avi_aac_codecid_0x706d:f746435529d8adfd5c2357937cc510be:passed:20080223-174500
T_234avi_aac_codecid_0x706d:dc9eb0a0949a0f8aff27d3fa65a2f596:passed:20080223-174500
T_235wav_fmt_chunk_length:2eff110d0ccae554d7cb5da4c337dc48:passed:20080226-134540
T_236ac3_in_mov:31555c8af38f9c00435fa17b40258554:passed:20080229-103912
T_237ac3_in_wav_iec61937_mode:e9643247b6e39a5860797c8f69ba0767:passed:20080229-152103