[FFmpeg-devel] [PATCH] lavc: remove imx_dump_header bitstream filter
Gaullier Nicolas
nicolas.gaullier at arkena.com
Tue Jun 10 22:57:18 CEST 2014
I strongly suggest not to remove this filter. The fact is that FCP, omneon, FFMBC among them or others do handle IMX differently that MPEG2. I am not able to say why, maybe it was some time ago only for FCP compatibility to identify IMX because FCP was indeed not able to decode regular MPEG2. But anyway, at the end, this had become a standard. The fact that some systems today are agile, flexible, robust and are able to read MOV IMX where the "IMX header" is missing in the mdat, is certainly a good thing, but I think they will all continue to write files the same way, without breaking compatibility : there are anyway many legacy systems around, and many archives in MOV IMX that are to stay consistent.
Nicolas
-----Message d'origine-----
De : ffmpeg-devel-bounces at ffmpeg.org [mailto:ffmpeg-devel-bounces at ffmpeg.org] De la part de Lou Logan
Envoyé : mardi 10 juin 2014 21:17
À : ffmpeg-devel at ffmpeg.org
Objet : [FFmpeg-devel] [PATCH] lavc: remove imx_dump_header bitstream filter
This bsf is probably obsolete. QuickTime 7, QuickTime X, and Final Cut 7 decode stream copied IMX to mov normally with just -vtag mx3n.
More info: [PATCH] doc/bitstream_filters: document imx_dump_header <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-June/158676.html>
Signed-off-by: Lou Logan <lou at lrcd.com>
Tested-by: Dave Rice <dave AT dericed DOT com>
---
doc/bitstream_filters.texi | 2 --
libavcodec/Makefile | 1 -
libavcodec/allcodecs.c | 1 -
libavcodec/imx_dump_header_bsf.c | 58 ----------------------------------------
4 files changed, 62 deletions(-)
delete mode 100644 libavcodec/imx_dump_header_bsf.c
diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 1bfd633..f1d1307 100644
--- a/doc/bitstream_filters.texi
+++ b/doc/bitstream_filters.texi
@@ -74,8 +74,6 @@ format with @command{ffmpeg}, you can use the command:
ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts @end example
- at section imx_dump_header
-
@section mjpeg2jpeg
Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 3f915c5..dffa4a0 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -808,7 +808,6 @@ OBJS-$(CONFIG_AAC_ADTSTOASC_BSF) += aac_adtstoasc_bsf.o aacadtsdec.o \
OBJS-$(CONFIG_CHOMP_BSF) += chomp_bsf.o
OBJS-$(CONFIG_DUMP_EXTRADATA_BSF) += dump_extradata_bsf.o
OBJS-$(CONFIG_H264_MP4TOANNEXB_BSF) += h264_mp4toannexb_bsf.o
-OBJS-$(CONFIG_IMX_DUMP_HEADER_BSF) += imx_dump_header_bsf.o
OBJS-$(CONFIG_MJPEG2JPEG_BSF) += mjpeg2jpeg_bsf.o mjpeg.o
OBJS-$(CONFIG_MJPEGA_DUMP_HEADER_BSF) += mjpega_dump_header_bsf.o
OBJS-$(CONFIG_MOV2TEXTSUB_BSF) += movsub_bsf.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 7650543..9b473bf 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -580,7 +580,6 @@ void avcodec_register_all(void)
REGISTER_BSF(CHOMP, chomp);
REGISTER_BSF(DUMP_EXTRADATA, dump_extradata);
REGISTER_BSF(H264_MP4TOANNEXB, h264_mp4toannexb);
- REGISTER_BSF(IMX_DUMP_HEADER, imx_dump_header);
REGISTER_BSF(MJPEG2JPEG, mjpeg2jpeg);
REGISTER_BSF(MJPEGA_DUMP_HEADER, mjpega_dump_header);
REGISTER_BSF(MP3_HEADER_DECOMPRESS, mp3_header_decompress); diff --git a/libavcodec/imx_dump_header_bsf.c b/libavcodec/imx_dump_header_bsf.c
deleted file mode 100644
index be43fbc..0000000
--- a/libavcodec/imx_dump_header_bsf.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * imx dump header bitstream filter
- * Copyright (c) 2007 Baptiste Coudurier
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * imx dump header bitstream filter
- * modifies bitstream to fit in mov and be decoded by final cut pro decoder
- */
-
-#include "avcodec.h"
-#include "bytestream.h"
-
-
-static int imx_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args,
- uint8_t **poutbuf, int *poutbuf_size,
- const uint8_t *buf, int buf_size, int keyframe)
-{
- /* MXF essence element key */
- static const uint8_t imx_header[16] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01,0x05,0x01,0x01,0x00 };
- uint8_t *poutbufp;
-
- if (avctx->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
- av_log(avctx, AV_LOG_ERROR, "imx bitstream filter only applies to mpeg2video codec\n");
- return 0;
- }
-
- *poutbuf = av_malloc(buf_size + 20 + FF_INPUT_BUFFER_PADDING_SIZE);
- poutbufp = *poutbuf;
- bytestream_put_buffer(&poutbufp, imx_header, 16);
- bytestream_put_byte(&poutbufp, 0x83); /* KLV BER long form */
- bytestream_put_be24(&poutbufp, buf_size);
- bytestream_put_buffer(&poutbufp, buf, buf_size);
- *poutbuf_size = poutbufp - *poutbuf;
- return 1;
-}
-
-AVBitStreamFilter ff_imx_dump_header_bsf = {
- .name = "imxdump",
- .filter = imx_dump_header,
-};
--
1.9.3
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list