type
stringclasses
5 values
content
stringlengths
9
163k
includes
#include <gst/video/video.h>
includes
#include <string.h>
includes
#include <cog/cogframe.h>
includes
#include <orc/orc.h>
includes
#include <math.h>
defines
#define GST_CAT_DEFAULT gst_mse_debug
defines
#define GST_TYPE_MSE (gst_mse_get_type())
defines
#define GST_MSE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MSE,GstMSE))
defines
#define GST_IS_MSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MSE))
defines
#define GST_MSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_MSE,GstMSEClass))
defines
#define GST_IS_MSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_MSE))
defines
#define GST_MSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_MSE,GstMSEClass))
defines
#define DEBUG_INIT(bla) \
structs
struct _GstMSE { GstElement element; /* < private > */ GstPad *srcpad; GstPad *sinkpad_ref; GstPad *sinkpad_test; GstBuffer *buffer_ref; GMutex *lock; GCond *cond; gboolean cancel; GstVideoFormat format; int width; int height; double luma_mse_sum; double chroma_mse_sum; int n_frames; ...
structs
struct _GstMSEClass { GstElementClass parent; };
functions
void gst_mse_base_init (gpointer klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_framestore_src_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_fr...
functions
void gst_mse_class_init (GstMSEClass * klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->set_property = gst_mse_set_property; gobject_class->get_property = gst_mse_get_property; gobject_class->finalize = gst_mse_finalize; g_object_class_install_property (gobject...
functions
void gst_mse_init (GstMSE * filter, GstMSEClass * klass) { gst_element_create_all_pads (GST_ELEMENT (filter)); filter->srcpad = gst_element_get_static_pad (GST_ELEMENT (filter), "src"); gst_pad_set_getcaps_function (filter->srcpad, gst_mse_getcaps); filter->sinkpad_ref = gst_element_get_static_pad (GST...
functions
void gst_mse_finalize (GObject * object) { GstMSE *fs = GST_MSE (object); g_mutex_free (fs->lock); g_cond_free (fs->cond); }
functions
gboolean gst_mse_set_caps (GstPad * pad, GstCaps * caps) { GstMSE *fs; fs = GST_MSE (gst_pad_get_parent (pad)); gst_video_format_parse_caps (caps, &fs->format, &fs->width, &fs->height); gst_object_unref (fs); return TRUE; }
functions
void gst_mse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { switch (prop_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; }
functions
void gst_mse_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstMSE *fs = GST_MSE (object); switch (prop_id) { case LUMA_PSNR: g_value_set_double (value, mse_to_db (fs->luma_mse_sum / fs->n_frames, FALSE)); break; case CHROMA_PSNR: g_valu...
functions
void gst_mse_reset (GstMSE * fs) { fs->luma_mse_sum = 0; fs->chroma_mse_sum = 0; fs->n_frames = 0; if (fs->buffer_ref) { gst_buffer_unref (fs->buffer_ref); fs->buffer_ref = NULL; }
functions
GstFlowReturn gst_mse_chain_ref (GstPad * pad, GstBuffer * buffer) { GstMSE *fs; fs = GST_MSE (gst_pad_get_parent (pad)); GST_DEBUG ("chain ref"); g_mutex_lock (fs->lock); while (fs->buffer_ref) { GST_DEBUG ("waiting for ref buffer clear"); g_cond_wait (fs->cond, fs->lock); if (fs->cancel) { ...
functions
GstFlowReturn gst_mse_chain_test (GstPad * pad, GstBuffer * buffer) { GstMSE *fs; GstFlowReturn ret; GstBuffer *buffer_ref; fs = GST_MSE (gst_pad_get_parent (pad)); GST_DEBUG_OBJECT (fs, "chain test"); g_mutex_lock (fs->lock); while (fs->buffer_ref == NULL) { GST_DEBUG_OBJECT (fs, "waiting for ref ...
functions
gboolean gst_mse_sink_event (GstPad * pad, GstEvent * event) { GstMSE *fs; fs = GST_MSE (gst_pad_get_parent (pad)); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_NEWSEGMENT: { gboolean update; double rate; double applied_rate; GstFormat format; gint64 start, stop, positi...
functions
int sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n) { #ifndef HAVE_ORC int sum = 0; int i; int x; for (i = 0; i < n; i++) { x = s1[i] - s2[i]; sum += x * x; }
functions
double cog_frame_component_squared_error (CogFrameData * a, CogFrameData * b) { int j; double sum; g_return_val_if_fail (a->width == b->width, 0.0); g_return_val_if_fail (a->height == b->height, 0.0); sum = 0; for (j = 0; j < a->height; j++) { sum += sum_square_diff_u8 (COG_FRAME_DATA_GET_LINE (a, j),...
functions
void cog_frame_mse (CogFrame * a, CogFrame * b, double *mse) { double sum, n; sum = cog_frame_component_squared_error (&a->components[0], &b->components[0]); n = a->components[0].width * a->components[0].height; mse[0] = sum / n; sum = cog_frame_component_squared_error (&a->components[1], &b->co...
functions
double mse_to_db (double mse, gboolean is_chroma) { if (is_chroma) { return 10.0 * log (mse / (224.0 * 224.0)) / log (10.0); }
includes
#include <stdlib.h>
includes
#include <stdint.h>
includes
#include <spd.h>
includes
#include <device/pci_def.h>
includes
#include <arch/io.h>
includes
#include <device/pnp_def.h>
includes
#include <console/console.h>
includes
#include <cpu/x86/bist.h>
includes
#include <cpu/x86/msr.h>
includes
#include <cpu/amd/lxdef.h>
includes
#include <southbridge/amd/cs5536/cs5536.h>
includes
#include <superio/ite/common/ite.h>
includes
#include <superio/ite/it8712f/it8712f.h>
includes
#include <northbridge/amd/lx/raminit.h>
includes
#include <cpu/intel/romstage.h>
defines
#define SERIAL_DEV PNP_DEV(0x2e, IT8712F_SP1)
defines
#define GPIO_DEV PNP_DEV(0x2e, IT8712F_GPIO)
defines
#define SMC_CONFIG 0x03
defines
#define SMC_CONFIG 0x01
functions
int spd_read_byte(unsigned int device, unsigned int address) { if (device != DIMM0) return 0xFF; /* No DIMM1, don't even try. */ #if CONFIG_DEBUG_SMBUS if (address >= sizeof(spdbytes) || spdbytes[address] == 0xFF) { printk(BIOS_ERR, "ERROR: spd_read_byte(DIMM0, 0x%02x) " "returns 0xff\n", address); }
functions
int smc_send_config(unsigned char config_data) { if (smbus_check_stop_condition(SMBUS_IO_BASE)) return 1; if (smbus_start_condition(SMBUS_IO_BASE)) return 2; if (smbus_send_slave_address(SMBUS_IO_BASE, 0x50)) // SMC address return 3; if (smbus_send_command(SMBUS_IO_BASE, 0x28)) // set config data return 4; ...
functions
void mb_gpio_init(void) { int i; /* Init Super I/O WDT, GPIOs. Done early, WDT init may trigger reset! */ for (i = 0; i < ARRAY_SIZE(sio_init_table); i++) { u16 reg = sio_init_table[i]; ite_reg_write(GPIO_DEV, (u8) reg, (reg >> 8)); }
functions
void main(unsigned long bist) { int err; static const struct mem_controller memctrl[] = { {.channel0 = {DIMM0, DIMM1}
includes
#include <epan/packet.h>
includes
#include <epan/prefs.h>
defines
#define iFCP_ENCAP_HEADER_LEN 28
defines
#define iFCP_MIN_HEADER_LEN 16 /* upto frame len field */
defines
#define IFCP_FLAGS_SES 0x04
defines
#define IFCP_FLAGS_TRP 0x02
defines
#define IFCP_FLAGS_SPC 0x01
defines
#define IFCP_COMMON_FLAGS_CRCV 0x04
functions
gboolean ifcp_header_test(tvbuff_t *tvb, int offset) { guint16 flen, flen1; /* we can only do this test if we have 16 bytes or more */ if(tvb_captured_length_remaining(tvb, offset)<iFCP_MIN_HEADER_LEN){ return FALSE; }
functions
int dissect_ifcpflags(tvbuff_t *tvb, int offset, proto_tree *parent_tree) { static const int * flags[] = { &hf_ifcp_flags_ses, &hf_ifcp_flags_trp, &hf_ifcp_flags_spc, NULL }
functions
void dissect_commonflags(tvbuff_t *tvb, int offset, proto_tree *parent_tree) { static const int * flags[] = { &hf_ifcp_common_flags_crcv, NULL }
functions
int dissect_ifcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { gint offset = 0, frame_len = 0; guint8 sof = 0, eof = 0; proto_item *ti; proto_tree *tree = NULL; tvbuff_t *next_tvb; guint8 protocol; proto_tree *protocol_tree ...
functions
else if (eof != iFCP_EOFt) { fc_data.sof_eof |= FC_DATA_EOF_INVALID; }
functions
guint get_ifcp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { guint pdu_len; if(!ifcp_header_test(tvb, offset)){ return 0; }
functions
int dissect_ifcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) { tcp_dissect_pdus(tvb, pinfo, parent_tree, ifcp_desegment, iFCP_MIN_HEADER_LEN, get_ifcp_pdu_len, dissect_ifcp_pdu, data); return tvb_captured_length(tvb); }
functions
int dissect_ifcp_handle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { return dissect_ifcp(tvb, pinfo, tree, data); }
functions
gboolean dissect_ifcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { if(!ifcp_header_test(tvb, 0)){ return FALSE; }
functions
void proto_register_ifcp (void) { /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { { &hf_ifcp_protocol, {"Protocol", "ifcp.encap.proto", FT_UINT8, BASE_DEC, VALS(fcencap_proto_vals), 0, NULL, HFILL }
functions
void proto_reg_handoff_ifcp (void) { heur_dissector_add("tcp", dissect_ifcp_heur, "iFCP over TCP", "ifcp_tcp", proto_ifcp, HEURISTIC_ENABLE); ifcp_handle = create_dissector_handle(dissect_ifcp_handle, proto_ifcp); dissector_add_for_decode_as("tcp.port", ifcp_handle); fc_handle = find_dissector_add_dep...
includes
#include <linux/syscalls.h>
includes
#include <linux/string.h>
includes
#include <linux/mm.h>
includes
#include <linux/fs.h>
includes
#include <linux/fsnotify.h>
includes
#include <linux/slab.h>
includes
#include <linux/init.h>
includes
#include <linux/hash.h>
includes
#include <linux/cache.h>
includes
#include <linux/export.h>
includes
#include <linux/mount.h>
includes
#include <linux/file.h>
includes
#include <asm/uaccess.h>
includes
#include <linux/security.h>
includes
#include <linux/seqlock.h>
includes
#include <linux/swap.h>
includes
#include <linux/bootmem.h>
includes
#include <linux/fs_struct.h>
includes
#include <linux/hardirq.h>
includes
#include <linux/bit_spinlock.h>
includes
#include <linux/rculist_bl.h>
includes
#include <linux/prefetch.h>
includes
#include <linux/ratelimit.h>
includes
#include <linux/list_lru.h>
includes
#include <asm/word-at-a-time.h>
defines
#define D_FLAG_VERIFY(dentry,x) WARN_ON_ONCE(((dentry)->d_flags & (DCACHE_LRU_LIST | DCACHE_SHRINK_LIST)) != (x))
structs
struct select_data { struct dentry *start; struct list_head dispose; int found; };
functions
long get_nr_dentry(void) { int i; long sum = 0; for_each_possible_cpu(i) sum += per_cpu(nr_dentry, i); return sum < 0 ? 0 : sum; }