[FFmpeg-devel] [PATCH] add support for ROI-based encoding
michael at niedermayer.cc
Wed Dec 5 22:41:06 EET 2018
On Wed, Dec 05, 2018 at 05:58:58PM +0800, Guo, Yejun wrote:
> this patch is not ask for merge, it is more to get a feature feedback.
> The encoders such as libx264 support different QPs offset for different MBs,
> it makes possible for ROI-based encoding. It makes sense to add support
> within ffmpeg to generate/accept ROI infos and pass into encoders.
> Typical usage: After AVFrame is decoded, a ffmpeg filter or user's code
> generates ROI info for that frame, and the encoder finally does the
> ROI-based encoding. And so I choose to maintain the ROI info within
> AVFrame struct.
> - remove code in vf_scale.c, it is just an example to generate ROI info
> - use AVBufferRef instead of current implementation within AVFrame struct.
> - add other encoders support
> Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
> libavcodec/libx264.c | 35 +++++++++++++++++++++++++++++++++++
> libavfilter/vf_scale.c | 8 ++++++++
> libavutil/frame.c | 9 +++++++++
> libavutil/frame.h | 14 ++++++++++++++
> 4 files changed, 66 insertions(+)
this causes asserion failures
./ffmpeg -i matrixbench_mpeg2.mpg this.mkv
ooooops, frame 0x0x3c03cc0 with rois 0
Assertion !"should not reach here" failed at libavcodec/libx264.c:381
Aborted (core dumped)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: not available
More information about the ffmpeg-devel