![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|

Go to the source code of this file.
Macros | |
| #define | MAX_BPS 8 /* for Y416 */ |
| maximal (average) number of pixels per know pixel formats (up-round if needed) | |
| #define | MAX_PADDING 64 |
| #define | MAX_PFB_SIZE 8 |
| maximal pixfmt block size (R12L - 8 B) | |
| #define | PIX_BLOCK_LCM 24 |
| least common multiple of all pixfmt block sizes in pixels (codec_info_t::block_size/codec_info_t::bpp). "contributors:" 8 R12L, 6 v210 | |
Functions | |
| bool | clear_video_buffer (unsigned char *data, size_t linesize, size_t pitch, size_t height, codec_t color_spec) |
| void | codec_get_planes_subsampling (codec_t pix_fmt, int *sub) |
| bool | codec_is_420 (codec_t pix_fmt) |
| bool | codec_is_a_rgb (codec_t codec) __attribute__((const)) |
| bool | codec_is_const_size (codec_t codec) __attribute__((const)) |
| bool | codec_is_hw_accelerated (codec_t codec) __attribute__((const)) |
| bool | codec_is_in_set (codec_t codec, const codec_t *set) __attribute__((pure)) |
| bool | codec_is_planar (codec_t codec) __attribute__((const)) |
| int | compare_pixdesc (const struct pixfmt_desc *desc_a, const struct pixfmt_desc *desc_b, const struct pixfmt_desc *src_desc) |
| int | get_bits_per_component (codec_t codec) __attribute__((const)) |
| double | get_bpp (codec_t codec) __attribute__((const)) |
| const char * | get_codec_file_extension (codec_t codec) __attribute__((const)) |
| codec_t | get_codec_from_fcc (uint32_t fourcc) __attribute__((const)) |
| codec_t | get_codec_from_file_extension (const char *ext) __attribute__((const)) |
| codec_t | get_codec_from_name (const char *name) __attribute__((const)) |
| const char * | get_codec_name (codec_t codec) __attribute__((const)) |
| const char * | get_codec_name_long (codec_t codec) __attribute__((const)) |
| uint32_t | get_fourcc (codec_t codec) __attribute__((const)) |
| int | get_pf_block_bytes (codec_t codec) __attribute__((const)) |
| int | get_pf_block_pixels (codec_t codec) __attribute__((const)) |
| const char * | get_pixdesc_desc (struct pixfmt_desc) |
| struct pixfmt_desc | get_pixfmt_desc (codec_t pixfmt) |
| int | get_subsampling (codec_t codec) __attribute__((const)) |
| void | i420_16_to_y416 (int width, int height, const unsigned char *in, unsigned char *out, int in_depth) |
| void | i420_8_to_uyvy (int width, int height, const unsigned char *in, unsigned char *out) |
| void | i422_16_to_y416 (int width, int height, const unsigned char *in, unsigned char *out, int in_depth) |
| void | i422_8_to_uyvy (int width, int height, const unsigned char *in, unsigned char *out) |
| void | i444_16_to_y416 (int width, int height, const unsigned char *in, unsigned char *out, int in_depth) |
| void | i444_8_to_uyvy (int width, int height, const unsigned char *in, unsigned char *out) |
| bool | is_codec_interframe (codec_t codec) __attribute__((const)) |
| bool | is_codec_opaque (codec_t codec) __attribute__((const)) |
| bool | pixdesc_equals (struct pixfmt_desc desc_a, struct pixfmt_desc desc_b) |
| void | show_codec_help (const char *module, const codec_t *codecs8, const codec_t *codecs10, const codec_t *codecs_ge12) |
| Prints list of suppored codecs for video module. | |
| void | uyvy_to_i422 (int width, int height, const unsigned char *in, unsigned char *out) |
| void | vc_deinterlace (unsigned char *src, long src_linesize, int lines) |
| Deinterlaces framebuffer. | |
| bool | vc_deinterlace_ex (codec_t codec, unsigned char *src, size_t src_linesize, unsigned char *dst, size_t dst_pitch, size_t lines) |
| size_t | vc_get_datalen (unsigned int width, unsigned int height, codec_t codec) __attribute__((const)) |
| int | vc_get_linesize (unsigned int width, codec_t codec) __attribute__((const)) |
| int | vc_get_size (unsigned int width, codec_t codec) __attribute__((const)) |
| void | watch_pixfmt_degrade (const char *mod_name, struct pixfmt_desc desc_src, struct pixfmt_desc desc_dst) |
| void | y416_to_i444 (int width, int height, const unsigned char *in, unsigned char *out, int depth) |
Definition in file video_codec.h.
| #define MAX_BPS 8 /* for Y416 */ |
maximal (average) number of pixels per know pixel formats (up-round if needed)
Definition at line 62 of file video_codec.h.
Referenced by benchmark(), decompress_thread(), and display_ndi_reconfigure().
| #define MAX_PADDING 64 |
maximal padding in bytes that may be needed to align to pixfmt block size for Y416->R12L: 64 = vc_linesize(8 /*maximal block pix count (R12L)*/, Y416 /*codec with maximal lenght of 1st arg-sized block*/)
Definition at line 63 of file video_codec.h.
Referenced by interlaced_video_pattern_generator::interlaced_video_pattern_generator(), benchmark(), display_ndi_reconfigure(), do_av_to_uv_convert(), filter(), filter(), video_frame_pool::impl::get_frame(), to_lavc_vid_conv_init(), vf_alloc_desc_data(), and vidcap_testcard2_thread().
| #define MAX_PFB_SIZE 8 |
maximal pixfmt block size (R12L - 8 B)
Definition at line 65 of file video_codec.h.
| #define PIX_BLOCK_LCM 24 |
least common multiple of all pixfmt block sizes in pixels (codec_info_t::block_size/codec_info_t::bpp). "contributors:" 8 R12L, 6 v210
Definition at line 66 of file video_codec.h.
Referenced by get_packet_sizes().
| bool clear_video_buffer | ( | unsigned char * | data, |
| size_t | linesize, | ||
| size_t | pitch, | ||
| size_t | height, | ||
| codec_t | color_spec ) |
Definition at line 862 of file video_codec.c.
References BGR, HW_VDPAU, RGB, RGBA, UYVY, and v210.
Referenced by vf_clear().
| void codec_get_planes_subsampling | ( | codec_t | pix_fmt, |
| int * | sub ) |
Returns subsampling of individual planes of planar pixel format
Undefined if pix_fmt is not a planar pixel format
| [out] | sub | subsampling, allocated array must be able to hold 8 members |
Definition at line 924 of file video_codec.c.
References pixfmt_plane_info, and pixfmt_plane_info_t::plane_info.
Referenced by buf_get_linesizes(), buf_get_planes(), same_linesizes(), to_lavc_vid_conv(), and vc_get_datalen().
| bool codec_is_420 | ( | codec_t | pix_fmt | ) |
Definition at line 930 of file video_codec.c.
References pixfmt_plane_info, and pixfmt_plane_info_t::plane_info.
| bool codec_is_a_rgb | ( | codec_t | codec | ) | const |
| bool codec_is_const_size | ( | codec_t | codec | ) | const |
| bool codec_is_hw_accelerated | ( | codec_t | codec | ) | const |
Tries to find specified codec in set of video codecs. The set must by ended by VIDEO_CODEC_NONE.
Definition at line 851 of file video_codec.c.
References VIDEO_CODEC_NONE.
Referenced by check_for_slave_format_change(), get_best_decoder_from(), load_texture(), reconfigure_if_needed(), and select_display_codec().
| bool codec_is_planar | ( | codec_t | codec | ) | const |
| int compare_pixdesc | ( | const struct pixfmt_desc * | desc_a, |
| const struct pixfmt_desc * | desc_b, | ||
| const struct pixfmt_desc * | src_desc ) |
qsort(_s)-compatible comparator
Definition at line 1138 of file video_codec.c.
References pixfmt_desc::depth, pixfmt_conv_pref, pixfmt_desc::rgb, and pixfmt_desc::subsampling.
Referenced by lavc_compare_convs_inner(), QSORT_S_COMP_DEFINE(), QSORT_S_COMP_DEFINE(), QSORT_S_COMP_DEFINE(), QSORT_S_COMP_DEFINE(), and set_convertible_formats().
| int get_bits_per_component | ( | codec_t | codec | ) | const |
| double get_bpp | ( | codec_t | codec | ) | const |
| const char * get_codec_file_extension | ( | codec_t | codec | ) | const |
| codec_t get_codec_from_fcc | ( | uint32_t | fourcc | ) | const |
| codec_t get_codec_from_file_extension | ( | const char * | ext | ) | const |
| codec_t get_codec_from_name | ( | const char * | name | ) | const |
| const char * get_codec_name | ( | codec_t | codec | ) | const |
| const char * get_codec_name_long | ( | codec_t | codec | ) | const |
| uint32_t get_fourcc | ( | codec_t | codec | ) | const |
| int get_pf_block_bytes | ( | codec_t | codec | ) | const |
| int get_pf_block_pixels | ( | codec_t | codec | ) | const |
| const char * get_pixdesc_desc | ( | struct pixfmt_desc | desc | ) |
Definition at line 1203 of file video_codec.c.
References desc.
Referenced by choose_codec_and_decoder(), decompress_thread(), j2k_probe_internal_codec(), and video_decoder_order_output_codecs().
| struct pixfmt_desc get_pixfmt_desc | ( | codec_t | pixfmt | ) |
Definition at line 1125 of file video_codec.c.
References codec_info_t::bits_per_channel, codec_info, pixfmt_desc::depth, codec_info_t::rgb, pixfmt_desc::rgb, codec_info_t::subsampling, pixfmt_desc::subsampling, VIDEO_CODEC_END, and VIDEO_CODEC_FIRST.
Referenced by get_av_to_uv_conversion(), get_available_pix_fmts(), get_best_decoder_from(), get_decoder_from_uv_to_uv(), pick_av_convertible_to_ug(), probe_internal(), probe_internal_cineform(), QSORT_S_COMP_DEFINE(), QSORT_S_COMP_DEFINE(), QSORT_S_COMP_DEFINE(), QSORT_S_COMP_DEFINE(), set_convertible_formats(), to_lavc_vid_conv_init(), and video_decoder_order_output_codecs().
| int get_subsampling | ( | codec_t | codec | ) | const |
| void i420_16_to_y416 | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out, | ||
| int | in_depth ) |
Definition at line 1022 of file video_codec.c.
References DEPTH16, vc_get_linesize(), and Y416.
Referenced by testcard_load_from_file_y4m().

| void i420_8_to_uyvy | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out ) |
Definition at line 1064 of file video_codec.c.
References OPTIMIZED_FOR, UYVY, and vc_get_linesize().
Referenced by i420_decompress(), and testcard_load_from_file_y4m().

| void i422_16_to_y416 | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out, | ||
| int | in_depth ) |
Definition at line 999 of file video_codec.c.
References DEPTH16.
Referenced by testcard_load_from_file_y4m().
| void i422_8_to_uyvy | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out ) |
Definition at line 1088 of file video_codec.c.
Referenced by testcard_load_from_file_y4m().
| void i444_16_to_y416 | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out, | ||
| int | in_depth ) |
Definition at line 981 of file video_codec.c.
Referenced by testcard_load_from_file_y4m().
| void i444_8_to_uyvy | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out ) |
Definition at line 1106 of file video_codec.c.
Referenced by testcard_load_from_file_y4m().
| bool is_codec_interframe | ( | codec_t | codec | ) | const |
| bool is_codec_opaque | ( | codec_t | codec | ) | const |
| bool pixdesc_equals | ( | struct pixfmt_desc | desc_a, |
| struct pixfmt_desc | desc_b ) |
Definition at line 1217 of file video_codec.c.
References pixfmt_desc::depth, pixfmt_desc::rgb, and pixfmt_desc::subsampling.
Referenced by reconfigure_if_needed(), and video_decoder_order_output_codecs().
| void show_codec_help | ( | const char * | module, |
| const codec_t * | codecs8, | ||
| const codec_t * | codecs10, | ||
| const codec_t * | codecs_ge12 ) |
Prints list of suppored codecs for video module.
Definition at line 250 of file video_codec.c.
References codec_info, name, and VIDEO_CODEC_NONE.
Referenced by show_help().
| void uyvy_to_i422 | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out ) |
Definition at line 941 of file video_codec.c.
Referenced by save_video_frame_as_y4m().
| void vc_deinterlace | ( | unsigned char * | src, |
| long | src_linesize, | ||
| int | lines ) |
Deinterlaces framebuffer.
vc_deinterlace performs linear blend deinterlace on a framebuffer.
| [in,out] | src | framebuffer to be deinterlaced |
| [in] | src_linesize | length of a line (bytes) |
| [in] | lines | number of lines |
Definition at line 588 of file video_codec.c.
References val.
Referenced by display_frame(), display_sage_run(), and slave_worker().
| bool vc_deinterlace_ex | ( | codec_t | codec, |
| unsigned char * | src, | ||
| size_t | src_linesize, | ||
| unsigned char * | dst, | ||
| size_t | dst_pitch, | ||
| size_t | lines ) |
Extended version of vc_deinterlace(). The former version was in-place only. This allows to output to a different buffer while it can still be used in-place.
Definition at line 713 of file video_codec.c.
References codec_is_planar(), DEBUG_TIMER_START, DEBUG_TIMER_STOP, get_bits_per_component(), is_codec_opaque(), R10k, R12L, v210, val, and vc_deinterlace_ex().
Referenced by deinterlace_postprocess(), display_frame(), perform_df(), and vc_deinterlace_ex().

| size_t vc_get_datalen | ( | unsigned int | width, |
| unsigned int | height, | ||
| codec_t | codec ) const |
| int vc_get_linesize | ( | unsigned int | width, |
| codec_t | codec ) const |
| int vc_get_size | ( | unsigned int | width, |
| codec_t | codec ) const |
| void watch_pixfmt_degrade | ( | const char * | mod_name, |
| struct pixfmt_desc | desc_src, | ||
| struct pixfmt_desc | desc_dst ) |
Definition at line 1184 of file video_codec.c.
References pixfmt_desc::depth, LOG_LEVEL_WARNING, log_msg(), and pixfmt_desc::subsampling.
Referenced by get_av_to_uv_conversion(), and to_lavc_vid_conv_init().

| void y416_to_i444 | ( | int | width, |
| int | height, | ||
| const unsigned char * | in, | ||
| unsigned char * | out, | ||
| int | depth ) |
Definition at line 963 of file video_codec.c.
Referenced by save_video_frame_as_y4m().