![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
Gpustitch 360 video stitcher. More...
#include "config.h"#include "config_unix.h"#include "config_win32.h"#include "debug.h"#include "host.h"#include "lib_common.h"#include "video.h"#include "video_capture.h"#include "tv.h"#include "audio/types.h"#include <stdio.h>#include <stdlib.h>#include <vector>#include <cmath>#include <limits>#include <thread>#include <condition_variable>#include <libgpustitch/stitcher.hpp>#include <libgpustitch/config_utils.hpp>#include <cuda.h>#include <cuda_runtime.h>#include "utils/cuda_pix_conv.h"#include "utils/profile_timer.hpp"
Go to the source code of this file.
Classes | |
| struct | grab_worker_state |
| struct | vidcap_gpustitch_state |
Macros | |
| #define | FMT_CMP(param) |
| #define | PI 3.14159265 |
Variables | |
| static const char * | log_str = "[gpustitch] " |
| static const struct video_capture_info | vidcap_gpustitch_info |
Gpustitch 360 video stitcher.
Definition in file gpustitch.cpp.
| #define FMT_CMP | ( | param | ) |
Referenced by parse_fmt().
| #define PI 3.14159265 |
Definition at line 69 of file gpustitch.cpp.
|
static |
Definition at line 617 of file gpustitch.cpp.
References video_frame::callbacks, video_desc::color_spec, vidcap_gpustitch_state::conv_func, vidcap_gpustitch_state::conv_tmp_frame, cudaMalloc, cudaSuccess, tile::data, video_frame_callbacks::data_deleter, tile::data_len, desc, vidcap_gpustitch_state::fps, video_desc::fps, vidcap_gpustitch_state::frame, video_desc::height, log_str, vidcap_gpustitch_state::out_fmt, vidcap_gpustitch_state::output_cuda_buf, video_frame_callbacks::recycle, result_data_delete(), video_desc::tile_count, video_frame::tiles, vc_get_linesize(), vf_alloc_desc(), and video_desc::width.
Referenced by download_stitched().

|
static |
Definition at line 168 of file gpustitch.cpp.
References video_frame::color_spec, grab_worker_state::conv_func, cuda_RGB_to_RGBA(), cuda_UYVY_to_RGBA(), cudaFree, cudaMalloc, grab_worker_state::height, tile::height, grab_worker_state::in_codec, log_str, RGB, RGBA, video_frame::tile_count, video_frame::tiles, grab_worker_state::tmp_in_frame, UYVY, vc_get_linesize(), grab_worker_state::width, and tile::width.
Referenced by grab_worker().

|
static |
Definition at line 652 of file gpustitch.cpp.
References allocate_result_frame(), vidcap_gpustitch_state::conv_func, vidcap_gpustitch_state::conv_tmp_frame, cudaSuccess, tile::data, vidcap_gpustitch_state::frame, log_str, vidcap_gpustitch_state::out_fmt, vidcap_gpustitch_state::output_cuda_buf, PROFILE_FUNC, vidcap_gpustitch_state::stitcher, video_frame::tiles, and vc_get_linesize().
Referenced by stitch().

|
static |
Definition at line 319 of file gpustitch.cpp.
References vidcap_gpustitch_state::cam_properties, check_in_format(), cudaMalloc, vidcap_gpustitch_state::done, video_frame::fps, frame, grab_worker_state::grabbed_count, grab_worker_state::grabbed_cv, grab_worker_state::grabbed_fps, grab_worker_state::grabbed_mut, grab_worker_state::height, initialize_video_capture(), param, PROFILE_DETAIL, PROFILE_FUNC, RGBA, grab_worker_state::s, vidcap_gpustitch_state::stitched_count, vidcap_gpustitch_state::stitched_cv, vidcap_gpustitch_state::stitched_mut, grab_worker_state::tiled, grab_worker_state::tmp_in_frame_stream, grab_worker_state::tmp_rgba_frame, grab_worker_state::tmp_rgba_frame_pitch, upload_frame(), upload_tiles(), vc_get_linesize(), vidcap_done(), vidcap_grab(), vidcap_params_get_driver(), vidcap_params_get_fmt(), VIDEO_FRAME_DISPOSE, and grab_worker_state::width.
Referenced by vidcap_gpustitch_init().

|
static |
Definition at line 389 of file gpustitch.cpp.
References vidcap_gpustitch_state::cam_properties, vidcap_gpustitch_state::conv_func, cuda_RGBA_to_RGB(), cuda_RGBA_to_UYVY(), vidcap_gpustitch_state::devices_cnt, LOG_LEVEL_ERROR, log_msg(), vidcap_gpustitch_state::out_fmt, RGB, RGBA, vidcap_gpustitch_state::spec_path, vidcap_gpustitch_state::stitch_params, vidcap_gpustitch_state::stitcher, vidcap_gpustitch_state::tiled_capture, and UYVY.
Referenced by vidcap_gpustitch_init().

|
static |
Definition at line 445 of file gpustitch.cpp.
References fmt, FMT_CMP, vidcap_gpustitch_state::fps, get_codec_from_name(), LOG_LEVEL_WARNING, log_msg(), name, vidcap_gpustitch_state::out_fmt, vidcap_gpustitch_state::output_cuda_buf, RGBA, vidcap_gpustitch_state::spec_path, vidcap_gpustitch_state::stitch_params, and vidcap_gpustitch_state::tiled_capture.
Referenced by vidcap_gpustitch_init().

| REGISTER_MODULE | ( | gpustitch | , |
| & | vidcap_gpustitch_info, | ||
| LIBRARY_CLASS_VIDEO_CAPTURE | , | ||
| VIDEO_CAPTURE_ABI_VERSION | ) |
|
static |
Definition at line 700 of file gpustitch.cpp.
References vidcap_gpustitch_state::fps, vidcap_gpustitch_state::frames, LOG_LEVEL_INFO, log_msg(), vidcap_gpustitch_state::t0, and tv_diff().
Referenced by vidcap_gpustitch_grab().

|
static |
Definition at line 610 of file gpustitch.cpp.
References cudaFreeHost, tile::data, and video_frame::tiles.
Referenced by allocate_result_frame().
|
static |
Definition at line 80 of file gpustitch.cpp.
References color_printf(), TERM_BOLD, TERM_FG_RED, TERM_FG_RESET, and TERM_RESET.
Referenced by vidcap_gpustitch_init().

|
static |
Definition at line 724 of file gpustitch.cpp.
References cudaSuccess, download_stitched(), vidcap_gpustitch_state::frame, log_str, PROFILE_DETAIL, PROFILE_FUNC, vidcap_gpustitch_state::stitched_count, vidcap_gpustitch_state::stitched_cv, vidcap_gpustitch_state::stitched_mut, and vidcap_gpustitch_state::stitcher.
Referenced by vidcap_gpustitch_grab().

|
static |
Definition at line 511 of file gpustitch.cpp.
References vidcap_gpustitch_state::capture_workers, vidcap_gpustitch_state::done, vidcap_gpustitch_state::stitched_cv, vidcap_gpustitch_state::stitched_mut, and worker().
Referenced by vidcap_gpustitch_done(), and vidcap_gpustitch_init().

|
static |
Definition at line 76 of file gpustitch.cpp.
|
static |
Definition at line 260 of file gpustitch.cpp.
References grab_worker_state::height, grab_worker_state::s, vidcap_gpustitch_state::stitcher, grab_worker_state::tmp_rgba_frame, grab_worker_state::tmp_rgba_frame_pitch, upload_to_cuda_buf(), and grab_worker_state::width.
Referenced by grab_worker().

|
static |
Definition at line 284 of file gpustitch.cpp.
References frame, grab_worker_state::height, grab_worker_state::s, vidcap_gpustitch_state::stitcher, grab_worker_state::tmp_rgba_frame, grab_worker_state::tmp_rgba_frame_pitch, upload_to_cuda_buf(), and grab_worker_state::width.
Referenced by grab_worker().

|
static |
Definition at line 213 of file gpustitch.cpp.
References video_frame::color_spec, grab_worker_state::conv_func, cudaMemcpyHostToDevice, cudaSuccess, tile::data, get_pf_block_bytes(), RGBA, video_frame::tiles, grab_worker_state::tmp_in_frame, vc_get_linesize(), and tile::width.
Referenced by upload_frame(), and upload_tiles().

|
static |
Definition at line 595 of file gpustitch.cpp.
References vidcap_gpustitch_state::captured_frames, vidcap_gpustitch_state::conv_tmp_frame, cudaFree, vidcap_gpustitch_state::frame, state, stop_grab_workers(), and vf_free().

|
static |
Definition at line 760 of file gpustitch.cpp.
References vidcap_gpustitch_state::fps, video_frame::fps, vidcap_gpustitch_state::frames, PROFILE_FUNC, report_stats(), state, stitch(), and wait_for_frames().

|
static |
Definition at line 525 of file gpustitch.cpp.
References vidcap_gpustitch_state::capture_workers, vidcap_gpustitch_state::captured_frames, vidcap_gpustitch_state::devices_cnt, vidcap_gpustitch_state::frame, vidcap_gpustitch_state::frames, grab_worker(), init_stitcher(), LOG_LEVEL_ERROR, log_msg(), params, parse_fmt(), show_help(), state, stop_grab_workers(), vidcap_gpustitch_state::t0, vidcap_gpustitch_state::tiled_capture, VIDCAP_FLAG_AUDIO_ANY, VIDCAP_INIT_AUDIO_NOT_SUPPORTED, VIDCAP_INIT_FAIL, VIDCAP_INIT_NOERR, VIDCAP_INIT_OK, vidcap_params_get_driver(), vidcap_params_get_flags(), vidcap_params_get_fmt(), and vidcap_params_get_next().

|
static |
Definition at line 160 of file gpustitch.cpp.
|
static |
Definition at line 711 of file gpustitch.cpp.
References vidcap_gpustitch_state::capture_workers, vidcap_gpustitch_state::fps, PROFILE_FUNC, vidcap_gpustitch_state::stitched_count, and worker().
Referenced by vidcap_gpustitch_grab().

|
static |
Definition at line 71 of file gpustitch.cpp.
Referenced by allocate_result_frame(), check_in_format(), download_stitched(), and stitch().
|
static |
Definition at line 787 of file gpustitch.cpp.