Skip to content

Commit ac46b1d

Browse files
author
Clement Champetier
committed
VideoEssenceTransform: add prints when verbose mode
1 parent 1c48473 commit ac46b1d

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

src/AvTranscoder/EssenceTransform/VideoEssenceTransform.cpp

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,34 @@ bool VideoEssenceTransform::init( const Frame& srcFrame, const Frame& dstFrame )
6161
av_image_fill_linesizes( &_srcLineSize[0], src.desc().getPixelDesc().findPixel(), src.desc().getWidth() );
6262
av_image_fill_linesizes( &_dstLineSize[0], dst.desc().getPixelDesc().findPixel(), dst.desc().getWidth() );
6363

64+
if( _verbose )
65+
{
66+
std::clog << "video conversion from ";
67+
const char* pixFmt;
68+
pixFmt = av_get_pix_fmt_name( src.desc().getPixelDesc().findPixel() );
69+
std::clog << ( pixFmt != NULL ? pixFmt : "None" ) << " to ";
70+
pixFmt = av_get_pix_fmt_name( dst.desc().getPixelDesc().findPixel() );
71+
std::clog << ( pixFmt != NULL ? pixFmt : "None" ) << std::endl;
72+
73+
std::clog << "source, width = " << src.desc().getWidth() << std::endl;
74+
std::clog << "source, height = " << src.desc().getHeight() << std::endl;
75+
76+
std::clog << "source, lineSize:" << std::endl;
77+
std::clog << "[0] = " << _srcLineSize[0] << std::endl;
78+
std::clog << "[1] = " << _srcLineSize[1] << std::endl;
79+
std::clog << "[2] = " << _srcLineSize[2] << std::endl;
80+
std::clog << "[3] = " << _srcLineSize[3] << std::endl;
81+
82+
std::clog << "destination, width = " << dst.desc().getWidth() << std::endl;
83+
std::clog << "destination, height = " << dst.desc().getHeight() << std::endl;
84+
85+
std::clog << "destination, lineSize:" << std::endl;
86+
std::clog << "[0] = " << _dstLineSize[0] << std::endl;
87+
std::clog << "[1] = " << _dstLineSize[1] << std::endl;
88+
std::clog << "[2] = " << _dstLineSize[2] << std::endl;
89+
std::clog << "[3] = " << _dstLineSize[3] << std::endl;
90+
}
91+
6492
size_t cumulSrcOffset = 0;
6593
size_t cumulDstOffset = 0;
6694

@@ -109,6 +137,33 @@ void VideoEssenceTransform::convert( const Frame& srcFrame, Frame& dstFrame )
109137
throw std::runtime_error( "unknown color convert context" );
110138
}
111139

140+
if( _verbose )
141+
{
142+
std::clog << "source, offset:" << std::endl;
143+
std::clog << "[0] = " << &_srcOffsets[0] << std::endl;
144+
std::clog << "[1] = " << &_srcOffsets[1] << std::endl;
145+
std::clog << "[2] = " << &_srcOffsets[2] << std::endl;
146+
std::clog << "[3] = " << &_srcOffsets[3] << std::endl;
147+
148+
std::clog << "source, slice:" << std::endl;
149+
std::clog << "[0] = " << &_srcData[0] << std::endl;
150+
std::clog << "[1] = " << &_srcData[1] << std::endl;
151+
std::clog << "[2] = " << &_srcData[2] << std::endl;
152+
std::clog << "[3] = " << &_srcData[3] << std::endl;
153+
154+
std::clog << "destination, offset:" << std::endl;
155+
std::clog << "[0] = " << &_dstOffsets[0] << std::endl;
156+
std::clog << "[1] = " << &_dstOffsets[1] << std::endl;
157+
std::clog << "[2] = " << &_dstOffsets[2] << std::endl;
158+
std::clog << "[3] = " << &_dstOffsets[3] << std::endl;
159+
160+
std::clog << "destination, slice:" << std::endl;
161+
std::clog << "[0] = " << &_dstData[0] << std::endl;
162+
std::clog << "[1] = " << &_dstData[1] << std::endl;
163+
std::clog << "[2] = " << &_dstData[2] << std::endl;
164+
std::clog << "[3] = " << &_dstData[3] << std::endl;
165+
}
166+
112167
int ret = sws_scale( _imageConvertContext,
113168
&_srcData[0], &_srcLineSize[0], 0, src.desc().getHeight(),
114169
&_dstData[0], &_dstLineSize[0] );

0 commit comments

Comments
 (0)