#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/codec/video_decoder_vpx.h"
#include <math.h>
#include <stdint.h>
#include "base/check_op.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "remoting/base/util.h"
#include "remoting/proto/video.pb.h"
#include "third_party/libvpx/source/libvpx/vpx/vp8dx.h"
#include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h"
#include "third_party/libyuv/include/libyuv/convert_argb.h"
#include "third_party/libyuv/include/libyuv/convert_from.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
namespace remoting {
namespace {
void RenderRect(vpx_image_t* image,
webrtc::DesktopRect rect,
VideoDecoder::PixelFormat pixel_format,
webrtc::DesktopFrame* frame) { … }
}
std::unique_ptr<VideoDecoderVpx> VideoDecoderVpx::CreateForVP8() { … }
std::unique_ptr<VideoDecoderVpx> VideoDecoderVpx::CreateForVP9() { … }
VideoDecoderVpx::~VideoDecoderVpx() = default;
void VideoDecoderVpx::SetPixelFormat(PixelFormat pixel_format) { … }
bool VideoDecoderVpx::DecodePacket(const VideoPacket& packet,
webrtc::DesktopFrame* frame) { … }
VideoDecoderVpx::VideoDecoderVpx(vpx_codec_iface_t* codec) { … }
}