Skip to content

Commit fac59ca

Browse files
committed
upgrade libyuv
1 parent 7ec2e6e commit fac59ca

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

include/jpegdecoder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class JpegDecoder : public Codec {
2929
}
3030

3131
void convertAndWrite(const char* buffer, unsigned int rsize, V4l2Output* videoOutput) {
32-
uint8 *i420_p0 = m_i420buffer;
33-
uint8 *i420_p1 = i420_p0 + m_width * m_height;
34-
uint8 *i420_p2 = i420_p1 + m_width * m_height / 2;
32+
uint8_t *i420_p0 = m_i420buffer;
33+
uint8_t *i420_p1 = i420_p0 + m_width * m_height;
34+
uint8_t *i420_p2 = i420_p1 + m_width * m_height / 2;
3535

3636
jpeg_mem_src(&m_cinfo, (unsigned char*)buffer, rsize);
3737
jpeg_read_header(&m_cinfo, TRUE);
@@ -58,7 +58,7 @@ class JpegDecoder : public Codec {
5858
libyuv::ConvertFromI420(i420_p0, m_width,
5959
i420_p1, (m_width + 1) / 2,
6060
i420_p2, (m_width + 1) / 2,
61-
(uint8 *)outBuffer, 0,
61+
(uint8_t *)outBuffer, 0,
6262
m_width, m_height,
6363
m_outformat);
6464

include/jpegencoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class JpegEncoder : public Codec {
4949
unsigned char * buffer_u = buffer_y + m_width*m_height;
5050
unsigned char * buffer_v = buffer_u + m_width*m_height/4;
5151

52-
libyuv::ConvertToI420((const uint8*)buffer, rsize,
52+
libyuv::ConvertToI420((const uint8_t*)buffer, rsize,
5353
buffer_y, m_width,
5454
buffer_u, (m_width+1)/2,
5555
buffer_v, (m_width+1)/2,

include/vpxencoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class VpxEncoder : public Codec {
8080

8181
void convertAndWrite(const char* buffer, unsigned int rsize, V4l2Output* videoOutput) {
8282

83-
libyuv::ConvertToI420((const uint8*)buffer, rsize,
83+
libyuv::ConvertToI420((const uint8_t*)buffer, rsize,
8484
m_input.planes[0], m_width,
8585
m_input.planes[1], (m_width+1)/2,
8686
m_input.planes[2], (m_width+1)/2,

include/x264encoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class X264Encoder : public Codec {
8080

8181
void convertAndWrite(const char* buffer, unsigned int rsize, V4l2Output* videoOutput) {
8282

83-
libyuv::ConvertToI420((const uint8*)buffer, rsize,
83+
libyuv::ConvertToI420((const uint8_t*)buffer, rsize,
8484
m_pic_in.img.plane[0], m_width,
8585
m_pic_in.img.plane[1], (m_width+1)/2,
8686
m_pic_in.img.plane[2], (m_width+1)/2,

include/x265encoder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ class X265Encoder : public Codec {
8282

8383
void convertAndWrite(const char* buffer, unsigned int rsize, V4l2Output* videoOutput) {
8484

85-
libyuv::ConvertToI420((const uint8*)buffer, rsize,
86-
(uint8*)m_pic_in->planes[0], m_width,
87-
(uint8*)m_pic_in->planes[1], (m_width+1)/2,
88-
(uint8*)m_pic_in->planes[2], (m_width+1)/2,
85+
libyuv::ConvertToI420((const uint8_t*)buffer, rsize,
86+
(uint8_t*)m_pic_in->planes[0], m_width,
87+
(uint8_t*)m_pic_in->planes[1], (m_width+1)/2,
88+
(uint8_t*)m_pic_in->planes[2], (m_width+1)/2,
8989
0, 0,
9090
m_width, m_height,
9191
m_width, m_height,

include/yuvconverter.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class YuvConverter : public Codec
1818
YuvConverter(int outformat, int informat, int width, int height, const std::map<std::string, std::string> &opt, int verbose)
1919
: Codec(informat, width, height), m_outformat(outformat)
2020
{
21-
m_i420 = new uint8[width * height * 2];
21+
m_i420 = new uint8_t[width * height * 2];
2222
}
2323

2424
~YuvConverter()
@@ -28,11 +28,11 @@ class YuvConverter : public Codec
2828

2929
void convertAndWrite(const char *buffer, unsigned int rsize, V4l2Output *videoOutput)
3030
{
31-
uint8 *i420_p0 = m_i420;
32-
uint8 *i420_p1 = i420_p0 + m_width * m_height;
33-
uint8 *i420_p2 = i420_p1 + m_width * m_height / 2;
31+
uint8_t *i420_p0 = m_i420;
32+
uint8_t *i420_p1 = i420_p0 + m_width * m_height;
33+
uint8_t *i420_p2 = i420_p1 + m_width * m_height / 2;
3434

35-
libyuv::ConvertToI420((const uint8 *)buffer, rsize,
35+
libyuv::ConvertToI420((const uint8_t *)buffer, rsize,
3636
i420_p0, m_width,
3737
i420_p1, (m_width + 1) / 2,
3838
i420_p2, (m_width + 1) / 2,
@@ -45,7 +45,7 @@ class YuvConverter : public Codec
4545
libyuv::ConvertFromI420(i420_p0, m_width,
4646
i420_p1, (m_width + 1) / 2,
4747
i420_p2, (m_width + 1) / 2,
48-
(uint8 *)outBuffer, 0,
48+
(uint8_t *)outBuffer, 0,
4949
m_width, m_height,
5050
m_outformat);
5151

@@ -54,7 +54,7 @@ class YuvConverter : public Codec
5454
}
5555

5656
private:
57-
uint8 *m_i420;
57+
uint8_t *m_i420;
5858
int m_outformat;
5959

6060
public:

libyuv

Submodule libyuv updated 215 files

src/v4l2dump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int main(int argc, char* argv[])
133133
||(videoCapture->getFormat() == V4L2_PIX_FMT_MJPEG) ) {
134134
int width = 0;
135135
int height = 0;
136-
if (libyuv::MJPGSize((const uint8*)buffer, rsize, &width, &height) == 0) {
136+
if (libyuv::MJPGSize((const uint8_t*)buffer, rsize, &width, &height) == 0) {
137137
LOG(NOTICE) << "libyuv::MJPGSize " << width << "x" << height;
138138
} else {
139139
LOG(WARN) << "libyuv::MJPGSize error";

0 commit comments

Comments
 (0)