MPEG CDVA Experimentation Model (CXM)  1.0
Compact Descriptors for Visual Analisys
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
mpeg7cdva::CompressedSegmentDescriptor Class Reference

Extension of segment descriptor container to also hold compressed data for a segment. More...

#include <CdvaImpl.h>

Inheritance diagram for mpeg7cdva::CompressedSegmentDescriptor:
Inheritance graph
[legend]
Collaboration diagram for mpeg7cdva::CompressedSegmentDescriptor:
Collaboration graph
[legend]

Public Member Functions

 CompressedSegmentDescriptor (const mpeg7cdvs::Parameters &params)
 
virtual ~CompressedSegmentDescriptor ()
 
virtual size_t write (std::ofstream &fout) const
 write (appending) this segment to a file More...
 
virtual size_t read (std::ifstream &fin, mpeg7cdvs::CdvsServer *cdvsserver)
 read (from the current position) this segment from a file More...
 
virtual unsigned char * allocateLocalBuffer (unsigned long sz)
 
virtual unsigned char * allocateGlobalBuffer (unsigned long sz)
 
virtual unsigned char * allocateHistoBuffer (unsigned long sz)
 
virtual unsigned char * getLocalBuffer ()
 
virtual unsigned char * getGlobalBuffer ()
 
virtual unsigned char * getHistoBuffer ()
 
virtual unsigned long getLocalBufSz ()
 
virtual unsigned long getGlobalBufSz ()
 
virtual unsigned long getHistoBufSz ()
 
virtual void setHistoBufSz (unsigned long sz)
 
virtual void setLocalUncompressedBufSz (unsigned long sz)
 
virtual void setGlobalUncompressedBufSz (unsigned long sz)
 
virtual DescriptorTimeMapgetDtm ()
 
virtual void clear ()
 clear the shot container More...
 
- Public Member Functions inherited from mpeg7cdva::SegmentDescriptor
 SegmentDescriptor ()
 
virtual ~SegmentDescriptor ()
 
void setParity (unsigned int value)
 Set the shot parity. More...
 
unsigned int getParity () const
 Get the shot parity. More...
 
void setStartTimeMs (unsigned long position_ms)
 Set the start time of the shot in milliseconds. More...
 
void setEndTimeMs (unsigned long position_ms)
 Set the start time of the frame in milliseconds. More...
 
unsigned long getStartTimeMs () const
 Get the shot start time in milliseconds. More...
 
unsigned long getEndTimeMs () const
 Get the frame start time in milliseconds. More...
 
bool empty () const
 returns true if the segment is empty More...
 

Protected Member Functions

void decode (char *globalMedBuf, unsigned int globalMedBufSz, std::vector< unsigned int > &nLocalDesc, unsigned char cdvsDescriptorMode, unsigned short origImgX, unsigned short origImgY, unsigned short histoMapSzX, unsigned short histoMapSzY, bool hasBitSel, bool hasVar, bool hasRelB)
 
void reconstructGlobalDifferences (char *uncompressedData, unsigned int uncompressedSz, int nrGDesc, bool hasVar, bool globalHasBitSelection, std::vector< unsigned int > &nLocalDesc)
 
mpeg7cdvs::FeatureList readFeatureListFromBinaryAbs (unsigned char *buffer, unsigned int bufferSz, bool readRelevance, unsigned int nrElemGr)
 
int numGlobFctPresent (const mpeg7cdvs::CdvsDescriptor &desc) const
 
int nBitsSet (unsigned char byte) const
 
- Protected Member Functions inherited from mpeg7cdva::SegmentDescriptor
size_t getSize () const
 

Protected Attributes

unsigned char * globalBuf
 buffer for differential global descriptors More...
 
unsigned char * localBuf
 buffer for local descriptors More...
 
unsigned char * histoBuf
 buffer for histogram descriptors More...
 
unsigned long globalBufSz
 size of encoded global buffer More...
 
unsigned long localBufSz
 size of encoded local buffer More...
 
unsigned long histoBufSz
 size of encoded histogram buffer More...
 
unsigned long globalUncompressedBufSz
 size of unencoded global buffer More...
 
unsigned long localUncompressedBufSz
 size of unencoded local buffer More...
 
DescriptorTimeMap dtm
 map for frame - descriptor association More...
 
const mpeg7cdvs::Parameters & params
 parameters needed to invoke histogram decoding More...
 
- Protected Attributes inherited from mpeg7cdva::SegmentDescriptor
unsigned long startTime
 
unsigned long endTime
 
unsigned int parity
 

Static Protected Attributes

static const int SHOT_HEADER_SIZE = 35
 
- Static Protected Attributes inherited from mpeg7cdva::SegmentDescriptor
static const int SHOT_HEADER_SIZE = 10
 

Additional Inherited Members

- Static Public Member Functions inherited from mpeg7cdva::SegmentDescriptor
static size_t addSegmentToDB (std::ifstream &fin, mpeg7cdvs::CdvsServer *cdvsserver, const std::string &relativepathname, bool optMatch)
 read (from the current position) this segment from a file and store it into the CdvsServer DB More...
 
- Data Fields inherited from mpeg7cdva::SegmentDescriptor
std::vector< mpeg7cdvs::CdvsDescriptor > keyframes
 keyframes belonging to this shot More...
 

Detailed Description

Extension of segment descriptor container to also hold compressed data for a segment.

Constructor & Destructor Documentation

◆ CompressedSegmentDescriptor()

mpeg7cdva::CompressedSegmentDescriptor::CompressedSegmentDescriptor ( const mpeg7cdvs::Parameters &  params)

◆ ~CompressedSegmentDescriptor()

virtual mpeg7cdva::CompressedSegmentDescriptor::~CompressedSegmentDescriptor ( )
virtual

Member Function Documentation

◆ allocateGlobalBuffer()

virtual unsigned char* mpeg7cdva::CompressedSegmentDescriptor::allocateGlobalBuffer ( unsigned long  sz)
virtual

◆ allocateHistoBuffer()

virtual unsigned char* mpeg7cdva::CompressedSegmentDescriptor::allocateHistoBuffer ( unsigned long  sz)
virtual

◆ allocateLocalBuffer()

virtual unsigned char* mpeg7cdva::CompressedSegmentDescriptor::allocateLocalBuffer ( unsigned long  sz)
virtual

◆ clear()

virtual void mpeg7cdva::CompressedSegmentDescriptor::clear ( )
virtual

clear the shot container

Reimplemented from mpeg7cdva::SegmentDescriptor.

◆ decode()

void mpeg7cdva::CompressedSegmentDescriptor::decode ( char *  globalMedBuf,
unsigned int  globalMedBufSz,
std::vector< unsigned int > &  nLocalDesc,
unsigned char  cdvsDescriptorMode,
unsigned short  origImgX,
unsigned short  origImgY,
unsigned short  histoMapSzX,
unsigned short  histoMapSzY,
bool  hasBitSel,
bool  hasVar,
bool  hasRelB 
)
protected
Parameters
nLocalDescdecode compressed descriptor structure

◆ getDtm()

virtual DescriptorTimeMap& mpeg7cdva::CompressedSegmentDescriptor::getDtm ( )
inlinevirtual

References mpeg7cdva::SegmentDescriptor::clear().

Here is the call graph for this function:

◆ getGlobalBuffer()

virtual unsigned char* mpeg7cdva::CompressedSegmentDescriptor::getGlobalBuffer ( )
inlinevirtual

◆ getGlobalBufSz()

virtual unsigned long mpeg7cdva::CompressedSegmentDescriptor::getGlobalBufSz ( )
inlinevirtual

◆ getHistoBuffer()

virtual unsigned char* mpeg7cdva::CompressedSegmentDescriptor::getHistoBuffer ( )
inlinevirtual

◆ getHistoBufSz()

virtual unsigned long mpeg7cdva::CompressedSegmentDescriptor::getHistoBufSz ( )
inlinevirtual

◆ getLocalBuffer()

virtual unsigned char* mpeg7cdva::CompressedSegmentDescriptor::getLocalBuffer ( )
inlinevirtual

◆ getLocalBufSz()

virtual unsigned long mpeg7cdva::CompressedSegmentDescriptor::getLocalBufSz ( )
inlinevirtual

◆ nBitsSet()

int mpeg7cdva::CompressedSegmentDescriptor::nBitsSet ( unsigned char  byte) const
inlineprotected

References mpeg7cdva::SegmentDescriptor::read(), and mpeg7cdva::SegmentDescriptor::write().

Here is the call graph for this function:

◆ numGlobFctPresent()

int mpeg7cdva::CompressedSegmentDescriptor::numGlobFctPresent ( const mpeg7cdvs::CdvsDescriptor &  desc) const
inlineprotected

◆ read()

virtual size_t mpeg7cdva::CompressedSegmentDescriptor::read ( std::ifstream &  fin,
mpeg7cdvs::CdvsServer *  cdvsserver 
)
virtual

read (from the current position) this segment from a file

Reimplemented from mpeg7cdva::SegmentDescriptor.

◆ readFeatureListFromBinaryAbs()

mpeg7cdvs::FeatureList mpeg7cdva::CompressedSegmentDescriptor::readFeatureListFromBinaryAbs ( unsigned char *  buffer,
unsigned int  bufferSz,
bool  readRelevance,
unsigned int  nrElemGr 
)
protected

◆ reconstructGlobalDifferences()

void mpeg7cdva::CompressedSegmentDescriptor::reconstructGlobalDifferences ( char *  uncompressedData,
unsigned int  uncompressedSz,
int  nrGDesc,
bool  hasVar,
bool  globalHasBitSelection,
std::vector< unsigned int > &  nLocalDesc 
)
protected

◆ setGlobalUncompressedBufSz()

virtual void mpeg7cdva::CompressedSegmentDescriptor::setGlobalUncompressedBufSz ( unsigned long  sz)
inlinevirtual

◆ setHistoBufSz()

virtual void mpeg7cdva::CompressedSegmentDescriptor::setHistoBufSz ( unsigned long  sz)
inlinevirtual

◆ setLocalUncompressedBufSz()

virtual void mpeg7cdva::CompressedSegmentDescriptor::setLocalUncompressedBufSz ( unsigned long  sz)
inlinevirtual

◆ write()

virtual size_t mpeg7cdva::CompressedSegmentDescriptor::write ( std::ofstream &  fout) const
virtual

write (appending) this segment to a file

Reimplemented from mpeg7cdva::SegmentDescriptor.

Field Documentation

◆ dtm

DescriptorTimeMap mpeg7cdva::CompressedSegmentDescriptor::dtm
protected

map for frame - descriptor association

◆ globalBuf

unsigned char* mpeg7cdva::CompressedSegmentDescriptor::globalBuf
protected

buffer for differential global descriptors

◆ globalBufSz

unsigned long mpeg7cdva::CompressedSegmentDescriptor::globalBufSz
protected

size of encoded global buffer

◆ globalUncompressedBufSz

unsigned long mpeg7cdva::CompressedSegmentDescriptor::globalUncompressedBufSz
protected

size of unencoded global buffer

◆ histoBuf

unsigned char* mpeg7cdva::CompressedSegmentDescriptor::histoBuf
protected

buffer for histogram descriptors

◆ histoBufSz

unsigned long mpeg7cdva::CompressedSegmentDescriptor::histoBufSz
protected

size of encoded histogram buffer

◆ localBuf

unsigned char* mpeg7cdva::CompressedSegmentDescriptor::localBuf
protected

buffer for local descriptors

◆ localBufSz

unsigned long mpeg7cdva::CompressedSegmentDescriptor::localBufSz
protected

size of encoded local buffer

◆ localUncompressedBufSz

unsigned long mpeg7cdva::CompressedSegmentDescriptor::localUncompressedBufSz
protected

size of unencoded local buffer

◆ params

const mpeg7cdvs::Parameters& mpeg7cdva::CompressedSegmentDescriptor::params
protected

parameters needed to invoke histogram decoding

◆ SHOT_HEADER_SIZE

const int mpeg7cdva::CompressedSegmentDescriptor::SHOT_HEADER_SIZE = 35
staticprotected

The documentation for this class was generated from the following file: