Home | History | Annotate | Download | only in base

Lines Matching refs:format

30 // Rounds up |coded_size| if necessary for |format|.
31 static gfx::Size AdjustCodedSize(VideoFrame::Format format,
34 switch (format) {
52 VideoFrame::Format format,
57 DCHECK(format != VideoFrame::UNKNOWN &&
58 format != VideoFrame::NV12 &&
59 format != VideoFrame::NATIVE_TEXTURE);
61 DCHECK(format != VideoFrame::HOLE);
67 gfx::Size new_coded_size = AdjustCodedSize(format, coded_size);
68 DCHECK(IsValidConfig(format, new_coded_size, visible_rect, natural_size));
71 new VideoFrame(format,
83 std::string VideoFrame::FormatToString(VideoFrame::Format format) {
84 switch (format) {
108 NOTREACHED() << "Invalid videoframe format provided: " << format;
113 bool VideoFrame::IsValidConfig(VideoFrame::Format format,
129 // Check format-specific width/height requirements.
130 switch (format) {
197 Format format,
206 gfx::Size new_coded_size = AdjustCodedSize(format, coded_size);
208 if (!IsValidConfig(format, new_coded_size, visible_rect, natural_size))
210 if (data_size < AllocationSize(format, new_coded_size))
213 switch (format) {
216 new VideoFrame(format,
242 Format format,
249 if (!IsValidConfig(format, coded_size, visible_rect, natural_size))
252 if (dmabuf_fds.size() != NumPlanes(format)) {
258 new VideoFrame(format,
295 Format format;
298 format = Format::I420;
300 format = Format::YV24;
304 format = Format::NV12;
306 DLOG(ERROR) << "CVPixelBuffer format not supported: " << cv_format;
314 if (!IsValidConfig(format, coded_size, visible_rect, natural_size))
318 new VideoFrame(format,
333 Format format,
345 gfx::Size new_coded_size = AdjustCodedSize(format, coded_size);
346 CHECK(IsValidConfig(format, new_coded_size, visible_rect, natural_size));
349 new VideoFrame(format,
374 CHECK_NE(frame->format(), NATIVE_TEXTURE);
378 new VideoFrame(frame->format(),
386 for (size_t i = 0; i < NumPlanes(frame->format()); ++i) {
463 size_t VideoFrame::NumPlanes(Format format) {
464 switch (format) {
483 NOTREACHED() << "Unsupported video frame format: " << format;
489 size_t VideoFrame::AllocationSize(Format format, const gfx::Size& coded_size) {
491 for (size_t i = 0; i < NumPlanes(format); ++i)
492 total += PlaneAllocationSize(format, i, coded_size);
497 gfx::Size VideoFrame::PlaneSize(Format format,
505 switch (format) {
569 NOTREACHED() << "Unsupported video frame format/plane: "
570 << format << "/" << plane;
574 size_t VideoFrame::PlaneAllocationSize(Format format,
578 return PlaneSize(format, plane, coded_size).GetArea();
582 int VideoFrame::PlaneHorizontalBitsPerPixel(Format format, size_t plane) {
583 switch (format) {
637 NOTREACHED() << "Unsupported video frame format/plane: "
638 << format << "/" << plane;
705 VideoFrame::VideoFrame(VideoFrame::Format format,
712 : format_(format),
743 bool VideoFrame::IsValidPlane(size_t plane, VideoFrame::Format format) {
744 return (plane < NumPlanes(format));
753 size_t VideoFrame::RowBytes(size_t plane, VideoFrame::Format format,
755 DCHECK(IsValidPlane(plane, format));
756 switch (format) {
809 NOTREACHED() << "Unsupported video frame format/plane: " << format << "/"
819 size_t VideoFrame::Rows(size_t plane, VideoFrame::Format format, int height) {
820 DCHECK(IsValidPlane(plane, format));
821 switch (format) {
875 NOTREACHED() << "Unsupported video frame format/plane: " << format << "/"