Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 215156 | Differences between
and this patch

Collapse All | Expand All

(-)mjpegtools-1.9.0rc3.orig/mpeg2enc/encodertypes.h (-1 / +3 lines)
Lines 25-30 Link Here
25
 */
25
 */
26
26
27
27
28
#include <cstdlib> // std::abs
29
28
class Parity
30
class Parity
29
{
31
{
30
public:
32
public:
Lines 70-76 Link Here
70
    inline const int &operator [] (int i) const { return val[i]; }
72
    inline const int &operator [] (int i) const { return val[i]; }
71
	inline int CodingPenaltyForSAD() const
73
	inline int CodingPenaltyForSAD() const
72
	{
74
	{
73
		return (abs(val[Dim::X]) + abs(val[Dim::Y]))<<3;
75
		return (std::abs(val[Dim::X]) + std::abs(val[Dim::Y]))<<3;
74
	}
76
	}
75
77
76
	inline void Zero() { val[Dim::Y] = val[Dim::X] = 0; }
78
	inline void Zero() { val[Dim::Y] = val[Dim::X] = 0; }
(-)mjpegtools-1.9.0rc3.orig/mpeg2enc/macroblock.cc (+1 lines)
Lines 21-26 Link Here
21
21
22
#include <stdio.h>
22
#include <stdio.h>
23
#include <cassert>
23
#include <cassert>
24
#include <climits> // INT_MAX
24
25
25
#include "macroblock.hh"
26
#include "macroblock.hh"
26
#include "mpeg2syntaxcodes.h"
27
#include "mpeg2syntaxcodes.h"
(-)mjpegtools-1.9.0rc3.orig/mpeg2enc/picturereader.cc (+1 lines)
Lines 20-25 Link Here
20
 */
20
 */
21
21
22
22
23
#include <climits> // INT_MAX
23
#include "picturereader.hh"
24
#include "picturereader.hh"
24
#include "mpeg2encoder.hh"
25
#include "mpeg2encoder.hh"
25
#include "imageplanes.hh"
26
#include "imageplanes.hh"
(-)mjpegtools-1.9.0rc3.orig/mplex/inputstrm.cpp (+1 lines)
Lines 23-28 Link Here
23
23
24
#include <config.h>
24
#include <config.h>
25
#include <assert.h>
25
#include <assert.h>
26
#include <climits> // INT_MAX
26
27
27
#include "mjpeg_types.h"
28
#include "mjpeg_types.h"
28
#include "inputstrm.hpp"
29
#include "inputstrm.hpp"
(-)mjpegtools-1.9.0rc3.orig/mplex/main.cpp (-9 / +10 lines)
Lines 48-53 Link Here
48
#include "outputstrm.hpp"
48
#include "outputstrm.hpp"
49
#include "multiplexor.hpp"
49
#include "multiplexor.hpp"
50
50
51
#include <cstring> // std::strncpy,strlen,strcpy,strcmp,strncmp
51
52
52
using std::auto_ptr;
53
using std::auto_ptr;
53
54
Lines 95-101 Link Here
95
96
96
FileOutputStream::FileOutputStream( const char *name_pat ) 
97
FileOutputStream::FileOutputStream( const char *name_pat ) 
97
{
98
{
98
	strncpy( filename_pat, name_pat, MAXPATHLEN );
99
	std::strncpy( filename_pat, name_pat, MAXPATHLEN );
99
	snprintf( cur_filename, MAXPATHLEN, filename_pat, segment_num );
100
	snprintf( cur_filename, MAXPATHLEN, filename_pat, segment_num );
100
}
101
}
101
      
102
      
Lines 126-138 Link Here
126
void 
127
void 
127
FileOutputStream::NextSegment( )
128
FileOutputStream::NextSegment( )
128
{
129
{
129
    auto_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] );
130
    auto_ptr<char> prev_filename_buf( new char[std::strlen(cur_filename)+1] );
130
    char *prev_filename = prev_filename_buf.get();
131
    char *prev_filename = prev_filename_buf.get();
131
	fclose(strm);
132
	fclose(strm);
132
	++segment_num;
133
	++segment_num;
133
    strcpy( prev_filename, cur_filename );
134
    std::strcpy( prev_filename, cur_filename );
134
	snprintf( cur_filename, MAXPATHLEN, filename_pat, segment_num );
135
	snprintf( cur_filename, MAXPATHLEN, filename_pat, segment_num );
135
	if( strcmp( prev_filename, cur_filename ) == 0 )
136
	if( std::strcmp( prev_filename, cur_filename ) == 0 )
136
	{
137
	{
137
		mjpeg_error_exit1( 
138
		mjpeg_error_exit1( 
138
			"Need to split output but there appears to be no %%d in the filename pattern %s", filename_pat );
139
			"Need to split output but there appears to be no %%d in the filename pattern %s", filename_pat );
Lines 200-206 Link Here
200
	{
201
	{
201
		mjpeg_error_exit1( "Unable to open file %s for reading.", bs_filename);
202
		mjpeg_error_exit1( "Unable to open file %s for reading.", bs_filename);
202
	}
203
	}
203
	filename = strcpy( new char[strlen(bs_filename)+1], bs_filename );
204
	filename = std::strcpy( new char[std::strlen(bs_filename)+1], bs_filename );
204
    streamname = filename;
205
    streamname = filename;
205
206
206
    SetBufSize(buf_size);
207
    SetBufSize(buf_size);
Lines 541-547 Link Here
541
        while( flag_table[flag].longname != 0 )
542
        while( flag_table[flag].longname != 0 )
542
        {
543
        {
543
            if( (len == 1 && *startptr == flag_table[flag].shortname ) ||
544
            if( (len == 1 && *startptr == flag_table[flag].shortname ) ||
544
                strncmp( startptr, flag_table[flag].longname, len ) == 0 )
545
                std::strncmp( startptr, flag_table[flag].longname, len ) == 0 )
545
            {
546
            {
546
                *flag_table[flag].flag = true;
547
                *flag_table[flag].flag = true;
547
                break;
548
                break;
Lines 604-612 Link Here
604
    f=strtod(optarg,&e);
605
    f=strtod(optarg,&e);
605
    if( *e ) {
606
    if( *e ) {
606
        while(isspace(*e)) e++;
607
        while(isspace(*e)) e++;
607
        if(!strcmp(e,"ms")) persecond=1000.0;
608
        if(!std::strcmp(e,"ms")) persecond=1000.0;
608
        else if(!strcmp(e,"s")) persecond=1.0;
609
        else if(!std::strcmp(e,"s")) persecond=1.0;
609
        else if(!strcmp(e,"mpt")) persecond=90000.0;
610
        else if(!std::strcmp(e,"mpt")) persecond=90000.0;
610
		else
611
		else
611
			return false;
612
			return false;
612
    }
613
    }
(-)mjpegtools-1.9.0rc3.orig/mplex/multiplexor.cpp (-2 / +3 lines)
Lines 36-41 Link Here
36
#endif
36
#endif
37
#include "multiplexor.hpp"
37
#include "multiplexor.hpp"
38
38
39
#include <cstring> // std::memset
39
40
40
/****************
41
/****************
41
 *
42
 *
Lines 1596-1602 Link Here
1596
                                   packet_size_field,
1597
                                   packet_size_field,
1597
                                   index );
1598
                                   index );
1598
    tozero = sector_buf+1024-index;
1599
    tozero = sector_buf+1024-index;
1599
    memset( index, 0, tozero);
1600
    std::memset( index, 0, tozero);
1600
    index += tozero;
1601
    index += tozero;
1601
    PS_Stream::BufferPacketSize( packet_size_field, index );    
1602
    PS_Stream::BufferPacketSize( packet_size_field, index );    
1602
1603
Lines 1613-1619 Link Here
1613
                                   packet_size_field,
1614
                                   packet_size_field,
1614
                                   index );
1615
                                   index );
1615
    tozero = sector_buf+2048-index;
1616
    tozero = sector_buf+2048-index;
1616
    memset( index, 0, tozero );
1617
    std::memset( index, 0, tozero );
1617
    index += tozero;
1618
    index += tozero;
1618
    PS_Stream::BufferPacketSize( packet_size_field, index );
1619
    PS_Stream::BufferPacketSize( packet_size_field, index );
1619
1620
(-)mjpegtools-1.9.0rc3.orig/mplex/padstrm.cpp (-4 / +4 lines)
Lines 26-32 Link Here
26
26
27
#include "padstrm.hpp"
27
#include "padstrm.hpp"
28
28
29
29
#include <cstring> // std::memset
30
30
31
//
31
//
32
// Generator for padding packets in a padding stream...
32
// Generator for padding packets in a padding stream...
Lines 35-53 Link Here
35
35
36
unsigned int PaddingStream::ReadPacketPayload(uint8_t *dst, unsigned int to_read)
36
unsigned int PaddingStream::ReadPacketPayload(uint8_t *dst, unsigned int to_read)
37
{
37
{
38
	memset( dst, STUFFING_BYTE, to_read );
38
	std::memset( dst, STUFFING_BYTE, to_read );
39
	return to_read;
39
	return to_read;
40
}
40
}
41
41
42
unsigned int VCDAPadStream::ReadPacketPayload(uint8_t *dst, unsigned int to_read)
42
unsigned int VCDAPadStream::ReadPacketPayload(uint8_t *dst, unsigned int to_read)
43
{
43
{
44
	memset( dst, STUFFING_BYTE, to_read );
44
	std::memset( dst, STUFFING_BYTE, to_read );
45
	return to_read;
45
	return to_read;
46
}
46
}
47
47
48
unsigned int DVDPriv2Stream::ReadPacketPayload(uint8_t *dst, unsigned int to_read)
48
unsigned int DVDPriv2Stream::ReadPacketPayload(uint8_t *dst, unsigned int to_read)
49
{
49
{
50
	memset( dst, 0, to_read );
50
	std::memset( dst, 0, to_read );
51
	return to_read;
51
	return to_read;
52
}
52
}
53
53
(-)mjpegtools-1.9.0rc3.orig/y4mdenoise/Set.hh (-1 / +1 lines)
Lines 23-29 Link Here
23
		// How we implement ourselves.
23
		// How we implement ourselves.
24
	
24
	
25
public:
25
public:
26
	typedef typename Imp::Allocator Allocator;
26
	typedef typename Imp::NodeAllocator Allocator;
27
		// The type of allocator to use to allocate items in the set.
27
		// The type of allocator to use to allocate items in the set.
28
28
29
	Set (const PRED &a_rPred = PRED(),
29
	Set (const PRED &a_rPred = PRED(),
(-)mjpegtools-1.9.0rc3.orig/y4mdenoise/SkipList.hh (-8 / +8 lines)
Lines 57-75 Link Here
57
		// Will give good sorting for up to e^10 items.
57
		// Will give good sorting for up to e^10 items.
58
	
58
	
59
public:
59
public:
60
	typedef Allocator<Node,HEADERCHUNK> Allocator;
60
	typedef Allocator<Node,HEADERCHUNK> NodeAllocator;
61
		// The type of node allocator to use.
61
		// The type of node allocator to use.
62
62
63
	static Allocator sm_oNodeAllocator;
63
	static NodeAllocator sm_oNodeAllocator;
64
		// The default node allocator.
64
		// The default node allocator.
65
65
66
	SkipList (const PRED &a_rPred = PRED(),
66
	SkipList (const PRED &a_rPred = PRED(),
67
			Allocator &a_rAlloc = sm_oNodeAllocator);
67
			NodeAllocator &a_rAlloc = sm_oNodeAllocator);
68
		// Default constructor.  Must be followed by Init().
68
		// Default constructor.  Must be followed by Init().
69
69
70
	SkipList (Status_t &a_reStatus, bool a_bAllowDuplicates,
70
	SkipList (Status_t &a_reStatus, bool a_bAllowDuplicates,
71
			uint32_t a_nRandSeed, const PRED &a_rPred = PRED(),
71
			uint32_t a_nRandSeed, const PRED &a_rPred = PRED(),
72
			Allocator &a_rAlloc = sm_oNodeAllocator);
72
			NodeAllocator &a_rAlloc = sm_oNodeAllocator);
73
		// Constructor.  Specify whether or not duplicates are allowed,
73
		// Constructor.  Specify whether or not duplicates are allowed,
74
		// and provide a random number seed.
74
		// and provide a random number seed.
75
75
Lines 255-261 Link Here
255
255
256
private:
256
private:
257
	
257
	
258
	Allocator &m_rNodeAllocator;
258
	NodeAllocator &m_rNodeAllocator;
259
		// Where we get memory to allocate nodes.
259
		// Where we get memory to allocate nodes.
260
260
261
	bool m_bAllowDuplicates;
261
	bool m_bAllowDuplicates;
Lines 337-343 Link Here
337
337
338
// The default node allocator.  Allocates 64K at a time.
338
// The default node allocator.  Allocates 64K at a time.
339
template <class KEY, class VALUE, class KEYFN, class PRED>
339
template <class KEY, class VALUE, class KEYFN, class PRED>
340
typename SkipList<KEY,VALUE,KEYFN,PRED>::Allocator
340
typename SkipList<KEY,VALUE,KEYFN,PRED>::NodeAllocator
341
	SkipList<KEY,VALUE,KEYFN,PRED>::sm_oNodeAllocator (65536);
341
	SkipList<KEY,VALUE,KEYFN,PRED>::sm_oNodeAllocator (65536);
342
342
343
343
Lines 345-351 Link Here
345
// Default constructor.  Must be followed by Init().
345
// Default constructor.  Must be followed by Init().
346
template <class KEY, class VALUE, class KEYFN, class PRED>
346
template <class KEY, class VALUE, class KEYFN, class PRED>
347
SkipList<KEY,VALUE,KEYFN,PRED>::SkipList (const PRED &a_rPred,
347
SkipList<KEY,VALUE,KEYFN,PRED>::SkipList (const PRED &a_rPred,
348
		Allocator &a_rAlloc)
348
		NodeAllocator &a_rAlloc)
349
	: m_rNodeAllocator (a_rAlloc), m_oPred (a_rPred)
349
	: m_rNodeAllocator (a_rAlloc), m_oPred (a_rPred)
350
{
350
{
351
	// Set up some defaults.
351
	// Set up some defaults.
Lines 371-377 Link Here
371
template <class KEY, class VALUE, class KEYFN, class PRED>
371
template <class KEY, class VALUE, class KEYFN, class PRED>
372
SkipList<KEY,VALUE,KEYFN,PRED>::SkipList (Status_t &a_reStatus,
372
SkipList<KEY,VALUE,KEYFN,PRED>::SkipList (Status_t &a_reStatus,
373
		bool a_bAllowDuplicates, uint32_t a_nRandSeed,
373
		bool a_bAllowDuplicates, uint32_t a_nRandSeed,
374
		const PRED &a_rPred, Allocator &a_rAlloc)
374
		const PRED &a_rPred, NodeAllocator &a_rAlloc)
375
	: m_rNodeAllocator (a_rAlloc), m_oPred (a_rPred)
375
	: m_rNodeAllocator (a_rAlloc), m_oPred (a_rPred)
376
{
376
{
377
	// Make sure they didn't start us off with an error.
377
	// Make sure they didn't start us off with an error.

Return to bug 215156