胡斌

fix bug of setting dest x position when rotate 90

... ... @@ -560,7 +560,7 @@ int CAVTranscoder::open_output_file(const char *filename)
for (int i = 0; i < h; i++) {
unsigned char * psrc = startSrcY + i * pSrcFrame->linesize[0];
unsigned char * psrc_end = psrc + w;
unsigned char * pdst = pDstFrame->data[0] + y*pDstFrame->linesize[0] + h -1 - i;
unsigned char * pdst = pDstFrame->data[0] + y*pDstFrame->linesize[0] + h -1 - i + x;
for (; psrc < psrc_end; psrc++, pdst+=pDstFrame->linesize[0]) {
*pdst = *psrc;
}
... ... @@ -570,7 +570,7 @@ int CAVTranscoder::open_output_file(const char *filename)
for (int i = 0; i < h/2; i++) {
unsigned char * psrc = startSrcU + i* pSrcFrame->linesize[1];
unsigned char * psrc_end = psrc + w/2;
unsigned char * pdst = pDstFrame->data[1] + y/2*pDstFrame->linesize[1] + h/2 -1 - i;
unsigned char * pdst = pDstFrame->data[1] + y/2*pDstFrame->linesize[1] + h/2 -1 - i +x/2;
for (; psrc < psrc_end; psrc++, pdst += pDstFrame->linesize[1]) {
*pdst = *psrc;
}
... ... @@ -580,7 +580,7 @@ int CAVTranscoder::open_output_file(const char *filename)
for (int i = 0; i < h / 2; i++) {
unsigned char * psrc = startSrcV + i* pSrcFrame->linesize[2];
unsigned char * psrc_end = psrc + w / 2;
unsigned char * pdst = pDstFrame->data[2] + y / 2 * pDstFrame->linesize[2] + h / 2 -1 - i;
unsigned char * pdst = pDstFrame->data[2] + y / 2 * pDstFrame->linesize[2] + h / 2 -1 - i + x/2;
for (; psrc < psrc_end; psrc++, pdst += pDstFrame->linesize[2]) {
*pdst = *psrc;
}
... ... @@ -638,7 +638,7 @@ int CAVTranscoder::open_output_file(const char *filename)
fillDestFrame(pDstFrame, _studentFrame, (SRC_W - SRC_H) / 2, 240, (SRC_W - SRC_H) / 2, 0, SRC_H, SRC_H);
}
}
else if (_studentFrame->pkt_dts != 90){
else if (_studentFrame->pkt_dts == 90){
fillDestFrame(pDstFrame, _studentFrame, 0, 240);
}
else {
... ...