| Index: media/ffmpeg/ffmpeg_common.cc
|
| diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
|
| index 5b6ef7fe3c19c3df7b31ffb194240198bc3e6f81..ca82eadce55013bbb26e6f8ec4cf9f9573012f31 100644
|
| --- a/media/ffmpeg/ffmpeg_common.cc
|
| +++ b/media/ffmpeg/ffmpeg_common.cc
|
| @@ -22,7 +22,7 @@ static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE,
|
| "DecoderBuffer padding size does not fit ffmpeg requirement");
|
|
|
| // Alignment requirement by FFmpeg for input and output buffers. This need to
|
| -// be updated to match FFmpeg when it changes.
|
| +// be updated to match FFmpeg when it changes. See libavutil/mem.c.
|
| #if defined(ARCH_CPU_ARM_FAMILY)
|
| static const int kFFmpegBufferAddressAlignment = 16;
|
| #else
|
| @@ -35,18 +35,21 @@ static_assert(
|
| DecoderBuffer::kAlignmentSize % kFFmpegBufferAddressAlignment == 0,
|
| "DecoderBuffer alignment size does not fit ffmpeg requirement");
|
|
|
| -// Allows faster SIMD YUV convert. Also, FFmpeg overreads/-writes occasionally.
|
| -// See video_get_buffer() in libavcodec/utils.c.
|
| -static const int kFFmpegOutputBufferPaddingSize = 16;
|
| -
|
| -static_assert(VideoFrame::kFrameSizePadding >= kFFmpegOutputBufferPaddingSize,
|
| - "VideoFrame padding size does not fit ffmpeg requirement");
|
| -
|
| static_assert(
|
| VideoFrame::kFrameAddressAlignment >= kFFmpegBufferAddressAlignment &&
|
| VideoFrame::kFrameAddressAlignment % kFFmpegBufferAddressAlignment == 0,
|
| "VideoFrame frame address alignment does not fit ffmpeg requirement");
|
|
|
| +static_assert(
|
| + VideoFrame::kFrameSizeAlignment >= STRIDE_ALIGN &&
|
| + VideoFrame::kFrameSizeAlignment % STRIDE_ALIGN == 0,
|
| + "VideoFrame size alignment does not fit ffmpeg requirement");
|
| +
|
| +// Allows faster SIMD YUV convert. Also, FFmpeg overreads/-writes occasionally.
|
| +// See video_get_buffer() and update_frame_pool() in libavcodec/utils.c
|
| +static_assert(VideoFrame::kFrameSizePadding >= FRAME_PADDING,
|
| + "VideoFrame padding size does not fit ffmpeg requirement");
|
| +
|
| static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond };
|
|
|
| base::TimeDelta ConvertFromTimeBase(const AVRational& time_base,
|
|
|