History

Merge remote-tracking branch 'qatar/master'

* qatar/master: Revert "h264: Properly set coded_{width, height} when parsing H.264." isom: add missing AVC-Intra tags, rearrange list and update comments avconv: remove stubs of crop* and pad* options avconv: re-add nb_streams to InputFile. Conflicts: avconv.c

Michael Niedermayer committed 15 years ago

Commit db5effe2 parents ea36c44 22141914 files · +18 −47Browse files

Unified · Split

4 files
  1. avconv.c +6 −25
  2. doc/avconv.texi +0 −14
  3. libavcodec/h264.c +0 −3
  4. libavformat/isom.c +12 −5
avconv.c+6−25
@@ -253,8 +253,9 @@ typedef struct InputFile { · 252 unmodified lines
253 int eof_reached; /* true if eof reached */253 int eof_reached; /* true if eof reached */
254 int ist_index; /* index of first stream in ist_table */254 int ist_index; /* index of first stream in ist_table */
255 int buffer_size; /* current total buffer size */255 int buffer_size; /* current total buffer size */
256 int nb_streams;
257 int64_t ts_offset;256 int64_t ts_offset;
257 int nb_streams; /* number of stream that avconv is aware of; may be different
258 from ctx.nb_streams if new streams appear during av_read_frame() */
258} InputFile;259} InputFile;
259 260
260typedef struct OutputStream {261typedef struct OutputStream {
@@ -2587,12 +2588,6 @@ static int opt_frame_rate(const char *opt, const char *arg) · 2326 unmodified lines
2587 return 0;2588 return 0;
2588}2589}
2589 2590
2590static int opt_frame_crop(const char *opt, const char *arg)
2591{
2592 fprintf(stderr, "Option '%s' has been removed, use the crop filter instead\n", opt);
2593 return AVERROR(EINVAL);
2594}
2595
2596static int opt_frame_size(const char *opt, const char *arg)2591static int opt_frame_size(const char *opt, const char *arg)
2597{2592{
2598 if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) {2593 if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) {
@@ -2602,11 +2597,6 @@ static int opt_frame_size(const char *opt, const char *arg) · 3 unmodified lines
2602 return 0;2597 return 0;
2603}2598}
2604 2599
2605static int opt_pad(const char *opt, const char *arg) {
2606 fprintf(stderr, "Option '%s' has been removed, use the pad filter instead\n", opt);
2607 return -1;
2608}
2609
2610static int opt_frame_pix_fmt(const char *opt, const char *arg)2600static int opt_frame_pix_fmt(const char *opt, const char *arg)
2611{2601{
2612 if (strcmp(arg, "list")) {2602 if (strcmp(arg, "list")) {
@@ -2785,13 +2775,13 @@ static int opt_map(const char *opt, const char *arg) · 172 unmodified lines
2785 }2775 }
2786 if (*sync)2776 if (*sync)
2787 sync++;2777 sync++;
2788 for (i = 0; i < input_files[sync_file_idx].ctx->nb_streams; i++)2778 for (i = 0; i < input_files[sync_file_idx].nb_streams; i++)
2789 if (check_stream_specifier(input_files[sync_file_idx].ctx,2779 if (check_stream_specifier(input_files[sync_file_idx].ctx,
2790 input_files[sync_file_idx].ctx->streams[i], sync) == 1) {2780 input_files[sync_file_idx].ctx->streams[i], sync) == 1) {
2791 sync_stream_idx = i;2781 sync_stream_idx = i;
2792 break;2782 break;
2793 }2783 }
2794 if (i == input_files[sync_file_idx].ctx->nb_streams) {2784 if (i == input_files[sync_file_idx].nb_streams) {
2795 av_log(NULL, AV_LOG_ERROR, "Sync stream specification in map %s does not "2785 av_log(NULL, AV_LOG_ERROR, "Sync stream specification in map %s does not "
2796 "match any streams.\n", arg);2786 "match any streams.\n", arg);
2797 exit_program(1);2787 exit_program(1);
@@ -2814,7 +2804,7 @@ static int opt_map(const char *opt, const char *arg) · 16 unmodified lines
2814 m->disabled = 1;2804 m->disabled = 1;
2815 }2805 }
2816 else2806 else
2817 for (i = 0; i < input_files[file_idx].ctx->nb_streams; i++) {2807 for (i = 0; i < input_files[file_idx].nb_streams; i++) {
2818 if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i],2808 if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i],
2819 *p == ':' ? p + 1 : p) <= 0)2809 *p == ':' ? p + 1 : p) <= 0)
2820 continue;2810 continue;
@@ -4001,7 +3991,7 @@ static int opt_target(const char *opt, const char *arg) · 1180 unmodified lines
4001 if(nb_input_files) {3991 if(nb_input_files) {
4002 int i, j;3992 int i, j;
4003 for (j = 0; j < nb_input_files; j++) {3993 for (j = 0; j < nb_input_files; j++) {
4004 for (i = 0; i < input_files[j].ctx->nb_streams; i++) {3994 for (i = 0; i < input_files[j].nb_streams; i++) {
4005 AVCodecContext *c = input_files[j].ctx->streams[i]->codec;3995 AVCodecContext *c = input_files[j].ctx->streams[i]->codec;
4006 if(c->codec_type != AVMEDIA_TYPE_VIDEO)3996 if(c->codec_type != AVMEDIA_TYPE_VIDEO)
4007 continue;3997 continue;
@@ -4222,15 +4212,6 @@ static const OptionDef options[] = { · 214 unmodified lines
4222 { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },4212 { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },
4223 { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "set pixel format, 'list' as argument shows all the pixel formats supported", "format" },4213 { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "set pixel format, 'list' as argument shows all the pixel formats supported", "format" },
4224 { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&frame_bits_per_raw_sample}, "set the number of bits per raw sample", "number" },4214 { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&frame_bits_per_raw_sample}, "set the number of bits per raw sample", "number" },
4225 { "croptop", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
4226 { "cropbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
4227 { "cropleft", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
4228 { "cropright", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
4229 { "padtop", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
4230 { "padbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
4231 { "padleft", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
4232 { "padright", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
4233 { "padcolor", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "color" },
4234 { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" },4215 { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" },
4235 { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },4216 { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },
4236 { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantizer scale (VBR)", "q" },4217 { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantizer scale (VBR)", "q" },
doc/avconv.texi+0−14
@@ -274,20 +274,6 @@ form @var{num}:@var{den}, where @var{num} and @var{den} are the · 273 unmodified lines
274numerator and denominator of the aspect ratio. For example "4:3",274numerator and denominator of the aspect ratio. For example "4:3",
275"16:9", "1.3333", and "1.7777" are valid argument values.275"16:9", "1.3333", and "1.7777" are valid argument values.
276 276
277@item -croptop @var{size}
278@item -cropbottom @var{size}
279@item -cropleft @var{size}
280@item -cropright @var{size}
281All the crop options have been removed. Use -vf
282crop=width:height:x:y instead.
283
284@item -padtop @var{size}
285@item -padbottom @var{size}
286@item -padleft @var{size}
287@item -padright @var{size}
288@item -padcolor @var{hex_color}
289All the pad options have been removed. Use -vf
290pad=width:height:x:y:color instead.
291@item -vn277@item -vn
292Disable video recording.278Disable video recording.
293@item -bt @var{tolerance}279@item -bt @var{tolerance}
libavcodec/h264.c+0−3
@@ -2601,9 +2601,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 2600 unmodified lines
2601 s->avctx->sample_aspect_ratio= h->sps.sar;2601 s->avctx->sample_aspect_ratio= h->sps.sar;
2602 av_assert0(s->avctx->sample_aspect_ratio.den);2602 av_assert0(s->avctx->sample_aspect_ratio.den);
2603 2603
2604 h->s.avctx->coded_width = 16*s->mb_width;
2605 h->s.avctx->coded_height = 16*s->mb_height;
2606
2607 if(h->sps.video_signal_type_present_flag){2604 if(h->sps.video_signal_type_present_flag){
2608 s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;2605 s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
2609 if(h->sps.colour_description_present_flag){2606 if(h->sps.colour_description_present_flag){
libavformat/isom.c+12−5
@@ -137,11 +137,18 @@ const AVCodecTag codec_movvideo_tags[] = { · 136 unmodified lines
137 { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },137 { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
138 138
139 { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */139 { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
140 { CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC Intra 50 / 1080 interlace */140 { CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */
141 { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC Intra 50 / 720 */141 { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */
142 { CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC Intra 100 / 1080 interlace */142 { CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */
143 { CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC Intra 100 / 720 */143 { CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */
144 { CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC Intra 100 / 1080 */144 { CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC-Intra 50M 1080i50 */
145 { CODEC_ID_H264, MKTAG('a', 'i', '5', '6') }, /* AVC-Intra 50M 1080i60 */
146 { CODEC_ID_H264, MKTAG('a', 'i', '1', 'p') }, /* AVC-Intra 100M 720p24/30/60 */
147 { CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC-Intra 100M 720p25/50 */
148 { CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC-Intra 100M 1080p25/50 */
149 { CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 1080p24/30/60 */
150 { CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
151 { CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
145 152
146 { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */153 { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */
147 { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */154 { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t