Commit db5effe1 authored by Michael Niedermayer's avatar Michael Niedermayer

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
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ea36c44e 22141917
...@@ -253,8 +253,9 @@ typedef struct InputFile { ...@@ -253,8 +253,9 @@ typedef struct InputFile {
int eof_reached; /* true if eof reached */ int eof_reached; /* true if eof reached */
int ist_index; /* index of first stream in ist_table */ int ist_index; /* index of first stream in ist_table */
int buffer_size; /* current total buffer size */ int buffer_size; /* current total buffer size */
int nb_streams;
int64_t ts_offset; int64_t ts_offset;
int nb_streams; /* number of stream that avconv is aware of; may be different
from ctx.nb_streams if new streams appear during av_read_frame() */
} InputFile; } InputFile;
typedef struct OutputStream { typedef struct OutputStream {
...@@ -2587,12 +2588,6 @@ static int opt_frame_rate(const char *opt, const char *arg) ...@@ -2587,12 +2588,6 @@ static int opt_frame_rate(const char *opt, const char *arg)
return 0; return 0;
} }
static int opt_frame_crop(const char *opt, const char *arg)
{
fprintf(stderr, "Option '%s' has been removed, use the crop filter instead\n", opt);
return AVERROR(EINVAL);
}
static int opt_frame_size(const char *opt, const char *arg) static int opt_frame_size(const char *opt, const char *arg)
{ {
if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) { 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) ...@@ -2602,11 +2597,6 @@ static int opt_frame_size(const char *opt, const char *arg)
return 0; return 0;
} }
static int opt_pad(const char *opt, const char *arg) {
fprintf(stderr, "Option '%s' has been removed, use the pad filter instead\n", opt);
return -1;
}
static int opt_frame_pix_fmt(const char *opt, const char *arg) static int opt_frame_pix_fmt(const char *opt, const char *arg)
{ {
if (strcmp(arg, "list")) { if (strcmp(arg, "list")) {
...@@ -2785,13 +2775,13 @@ static int opt_map(const char *opt, const char *arg) ...@@ -2785,13 +2775,13 @@ static int opt_map(const char *opt, const char *arg)
} }
if (*sync) if (*sync)
sync++; sync++;
for (i = 0; i < input_files[sync_file_idx].ctx->nb_streams; i++) for (i = 0; i < input_files[sync_file_idx].nb_streams; i++)
if (check_stream_specifier(input_files[sync_file_idx].ctx, if (check_stream_specifier(input_files[sync_file_idx].ctx,
input_files[sync_file_idx].ctx->streams[i], sync) == 1) { input_files[sync_file_idx].ctx->streams[i], sync) == 1) {
sync_stream_idx = i; sync_stream_idx = i;
break; break;
} }
if (i == input_files[sync_file_idx].ctx->nb_streams) { if (i == input_files[sync_file_idx].nb_streams) {
av_log(NULL, AV_LOG_ERROR, "Sync stream specification in map %s does not " av_log(NULL, AV_LOG_ERROR, "Sync stream specification in map %s does not "
"match any streams.\n", arg); "match any streams.\n", arg);
exit_program(1); exit_program(1);
...@@ -2814,7 +2804,7 @@ static int opt_map(const char *opt, const char *arg) ...@@ -2814,7 +2804,7 @@ static int opt_map(const char *opt, const char *arg)
m->disabled = 1; m->disabled = 1;
} }
else else
for (i = 0; i < input_files[file_idx].ctx->nb_streams; i++) { for (i = 0; i < input_files[file_idx].nb_streams; i++) {
if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i], if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i],
*p == ':' ? p + 1 : p) <= 0) *p == ':' ? p + 1 : p) <= 0)
continue; continue;
...@@ -4001,7 +3991,7 @@ static int opt_target(const char *opt, const char *arg) ...@@ -4001,7 +3991,7 @@ static int opt_target(const char *opt, const char *arg)
if(nb_input_files) { if(nb_input_files) {
int i, j; int i, j;
for (j = 0; j < nb_input_files; j++) { for (j = 0; j < nb_input_files; j++) {
for (i = 0; i < input_files[j].ctx->nb_streams; i++) { for (i = 0; i < input_files[j].nb_streams; i++) {
AVCodecContext *c = input_files[j].ctx->streams[i]->codec; AVCodecContext *c = input_files[j].ctx->streams[i]->codec;
if(c->codec_type != AVMEDIA_TYPE_VIDEO) if(c->codec_type != AVMEDIA_TYPE_VIDEO)
continue; continue;
...@@ -4222,15 +4212,6 @@ static const OptionDef options[] = { ...@@ -4222,15 +4212,6 @@ static const OptionDef options[] = {
{ "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },
{ "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" }, { "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" },
{ "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" }, { "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" },
{ "croptop", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
{ "cropbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
{ "cropleft", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
{ "cropright", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" },
{ "padtop", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
{ "padbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
{ "padleft", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
{ "padright", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" },
{ "padcolor", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "color" },
{ "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" }, { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" },
{ "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" }, { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },
{ "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantizer scale (VBR)", "q" }, { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantizer scale (VBR)", "q" },
......
...@@ -274,20 +274,6 @@ form @var{num}:@var{den}, where @var{num} and @var{den} are the ...@@ -274,20 +274,6 @@ form @var{num}:@var{den}, where @var{num} and @var{den} are the
numerator and denominator of the aspect ratio. For example "4:3", numerator and denominator of the aspect ratio. For example "4:3",
"16:9", "1.3333", and "1.7777" are valid argument values. "16:9", "1.3333", and "1.7777" are valid argument values.
@item -croptop @var{size}
@item -cropbottom @var{size}
@item -cropleft @var{size}
@item -cropright @var{size}
All the crop options have been removed. Use -vf
crop=width:height:x:y instead.
@item -padtop @var{size}
@item -padbottom @var{size}
@item -padleft @var{size}
@item -padright @var{size}
@item -padcolor @var{hex_color}
All the pad options have been removed. Use -vf
pad=width:height:x:y:color instead.
@item -vn @item -vn
Disable video recording. Disable video recording.
@item -bt @var{tolerance} @item -bt @var{tolerance}
......
...@@ -2601,9 +2601,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ ...@@ -2601,9 +2601,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
s->avctx->sample_aspect_ratio= h->sps.sar; s->avctx->sample_aspect_ratio= h->sps.sar;
av_assert0(s->avctx->sample_aspect_ratio.den); av_assert0(s->avctx->sample_aspect_ratio.den);
h->s.avctx->coded_width = 16*s->mb_width;
h->s.avctx->coded_height = 16*s->mb_height;
if(h->sps.video_signal_type_present_flag){ if(h->sps.video_signal_type_present_flag){
s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
if(h->sps.colour_description_present_flag){ if(h->sps.colour_description_present_flag){
......
...@@ -137,11 +137,18 @@ const AVCodecTag codec_movvideo_tags[] = { ...@@ -137,11 +137,18 @@ const AVCodecTag codec_movvideo_tags[] = {
{ CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') }, { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
{ CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */ { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
{ CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC Intra 50 / 1080 interlace */ { CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */
{ CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC Intra 50 / 720 */ { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC Intra 100 / 1080 interlace */ { CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC Intra 100 / 720 */ { CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC Intra 100 / 1080 */ { CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC-Intra 50M 1080i50 */
{ CODEC_ID_H264, MKTAG('a', 'i', '5', '6') }, /* AVC-Intra 50M 1080i60 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', 'p') }, /* AVC-Intra 100M 720p24/30/60 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC-Intra 100M 720p25/50 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC-Intra 100M 1080p25/50 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 1080p24/30/60 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
{ CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
{ CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */ { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */
{ CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */ { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment