diff -ur mythsvn-7466/mythtv/libs/libmythtv/videooutbase.cpp mythsvn-local/mythtv/libs/libmythtv/videooutbase.cpp
old
|
new
|
|
169 | 169 | ZoomedIn(0), ZoomedUp(0), ZoomedRight(0), |
170 | 170 | |
171 | 171 | // Picture-in-Picture stuff |
172 | | PIPLocation(0), |
| 172 | PIPLocation(0), desired_pipsize(26), |
173 | 173 | desired_piph(128), desired_pipw(160), |
174 | 174 | piph_in(-1), pipw_in(-1), |
175 | 175 | piph_out(-1), pipw_out(-1), |
… |
… |
|
568 | 568 | if (imgw == 1920 && imgh == 1088) |
569 | 569 | imgh = 1080; // ATSC 1920x1080 |
570 | 570 | |
571 | | // Set an appropriate PiP size |
572 | | if (imgh > 1000) |
573 | | (desired_pipw = 368), (desired_piph = 288); |
574 | | else if (imgh > 700) |
575 | | (desired_pipw = 240), (desired_piph = 192); |
576 | | else |
577 | | (desired_pipw = 160), (desired_piph = 128); |
578 | | |
579 | 571 | // Get display aspect and correct for rounding errors |
580 | 572 | displayAspect = GetDisplayAspect(); |
581 | 573 | |
… |
… |
|
1039 | 1031 | int pipw, piph; |
1040 | 1032 | |
1041 | 1033 | VideoFrame *pipimage = pipplayer->GetCurrentFrame(pipw, piph); |
| 1034 | float pipvideoAspect = pipplayer->GetVideoAspect(); |
1042 | 1035 | |
1043 | | if (!pipimage || !pipimage->buf || pipimage->codec != FMT_YV12) |
| 1036 | if (videoAspect <= 0 |
| 1037 | || frame->height <= 0 |
| 1038 | || frame->width <= 0 |
| 1039 | || !pipimage |
| 1040 | || !pipimage->buf |
| 1041 | || pipimage->codec != FMT_YV12) |
1044 | 1042 | { |
1045 | 1043 | pipplayer->ReleaseCurrentFrame(pipimage); |
1046 | 1044 | return; |
1047 | 1045 | } |
| 1046 | |
| 1047 | desired_piph = frame->height * desired_pipsize / 100; |
| 1048 | desired_pipw = (int) ((frame->width * desired_pipsize / 100) * (pipvideoAspect / videoAspect)); |
| 1049 | desired_piph -= desired_piph % 2; |
| 1050 | desired_pipw -= desired_pipw % 2; |
1048 | 1051 | |
1049 | 1052 | int xoff; |
1050 | 1053 | int yoff; |
diff -ur mythsvn-7466/mythtv/libs/libmythtv/videooutbase.h mythsvn-local/mythtv/libs/libmythtv/videooutbase.h
old
|
new
|
|
327 | 327 | |
328 | 328 | // Picture-in-Picture |
329 | 329 | int PIPLocation; |
| 330 | int desired_pipsize; |
330 | 331 | int desired_piph; |
331 | 332 | int desired_pipw; |
332 | 333 | int piph_in; |