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
253253 int eof_reached; /* true if eof reached */
254254 int ist_index; /* index of first stream in ist_table */
255255 int buffer_size; /* current total buffer size */
256− int nb_streams;
257256 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() */
258259 } InputFile;
259260
260261 typedef struct OutputStream {
@@ -2587,12 +2588,6 @@ static int opt_frame_rate(const char *opt, const char *arg) · 2326 unmodified lines
25872588 return 0;
25882589 }
25892590
2590−static 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−
25962591 static int opt_frame_size(const char *opt, const char *arg)
25972592 {
25982593 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
26022597 return 0;
26032598 }
26042599
2605−static 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−
26102600 static int opt_frame_pix_fmt(const char *opt, const char *arg)
26112601 {
26122602 if (strcmp(arg, "list")) {
@@ -2785,13 +2775,13 @@ static int opt_map(const char *opt, const char *arg) · 172 unmodified lines
27852775 }
27862776 if (*sync)
27872777 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++)
27892779 if (check_stream_specifier(input_files[sync_file_idx].ctx,
27902780 input_files[sync_file_idx].ctx->streams[i], sync) == 1) {
27912781 sync_stream_idx = i;
27922782 break;
27932783 }
2794− if (i == input_files[sync_file_idx].ctx->nb_streams) {
2784+ if (i == input_files[sync_file_idx].nb_streams) {
27952785 av_log(NULL, AV_LOG_ERROR, "Sync stream specification in map %s does not "
27962786 "match any streams.\n", arg);
27972787 exit_program(1);
@@ -2814,7 +2804,7 @@ static int opt_map(const char *opt, const char *arg) · 16 unmodified lines
28142804 m->disabled = 1;
28152805 }
28162806 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++) {
28182808 if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i],
28192809 *p == ':' ? p + 1 : p) <= 0)
28202810 continue;
@@ -4001,7 +3991,7 @@ static int opt_target(const char *opt, const char *arg) · 1180 unmodified lines
40013991 if(nb_input_files) {
40023992 int i, j;
40033993 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++) {
40053995 AVCodecContext *c = input_files[j].ctx->streams[i]->codec;
40063996 if(c->codec_type != AVMEDIA_TYPE_VIDEO)
40073997 continue;
@@ -4222,15 +4212,6 @@ static const OptionDef options[] = { · 214 unmodified lines
42224212 { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },
42234213 { "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" },
42244214 { "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" },
42344215 { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" },
42354216 { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },
42364217 { "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
274274 numerator and denominator of the aspect ratio. For example "4:3",
275275 "16:9", "1.3333", and "1.7777" are valid argument values.
276276
277−@item -croptop @var{size}
278−@item -cropbottom @var{size}
279−@item -cropleft @var{size}
280−@item -cropright @var{size}
281−All the crop options have been removed. Use -vf
282−crop=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}
289−All the pad options have been removed. Use -vf
290−pad=width:height:x:y:color instead.
291277 @item -vn
292278 Disable video recording.
293279 @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
26012601 s->avctx->sample_aspect_ratio= h->sps.sar;
26022602 av_assert0(s->avctx->sample_aspect_ratio.den);
26032603
2604− h->s.avctx->coded_width = 16*s->mb_width;
2605− h->s.avctx->coded_height = 16*s->mb_height;
2606−
26072604 if(h->sps.video_signal_type_present_flag){
26082605 s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
26092606 if(h->sps.colour_description_present_flag){
libavformat/isom.c+12−5
@@ -137,11 +137,18 @@ const AVCodecTag codec_movvideo_tags[] = { · 136 unmodified lines
137137 { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
138138
139139 { 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 */
141− { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC Intra 50 / 720 */
142− { CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC Intra 100 / 1080 interlace */
143− { CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC Intra 100 / 720 */
144− { CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC Intra 100 / 1080 */
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 50M 720p25/50 */
142+ { CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */
143+ { CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */
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 */
145152
146153 { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */
147154 { 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