summaryrefslogtreecommitdiffstats
path: root/media/player/view.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/player/view.h')
-rw-r--r--media/player/view.h48
1 files changed, 8 insertions, 40 deletions
diff --git a/media/player/view.h b/media/player/view.h
index 9e99587..8a87dbb 100644
--- a/media/player/view.h
+++ b/media/player/view.h
@@ -19,10 +19,6 @@
#include <string.h>
#endif
-// Enable swscaler.
-// TODO(fbarchard): Include header and change bilinear to point sampling.
-// #define TEST_SWSCALER 1
-
#include <atlscrl.h>
#include "base/basictypes.h"
@@ -213,42 +209,14 @@ class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
bool enable_draw = media::Movie::get()->GetDrawEnable();
if (enable_draw) {
-#ifdef TEST_SWSCALER
- bool enable_swscaler = media::Movie::get()->GetSwscalerEnable();
- if (enable_swscaler) {
- uint8* data_out[3];
- int stride_out[3];
- data_out[0] = movie_dib_bits;
- data_out[1] = NULL;
- data_out[2] = NULL;
- stride_out[0] = dibrowbytes;
- stride_out[1] = 0;
- stride_out[2] = 0;
-
- if (!sws_context_) {
- DCHECK(frame_in.format == VideoSurface::YV12);
- sws_context_ = sws_getContext(frame_in.width, frame_in.height,
- PIX_FMT_YUV420P, width_, height_,
- PIX_FMT_RGB32, SWS_FAST_BILINEAR,
- NULL, NULL, NULL);
- DCHECK(sws_context_);
- }
-
- sws_scale(sws_context_, frame_in.data, frame_in.strides, 0,
- height_, data_out, stride_out);
- } else {
-#endif
- DCHECK(bm.bmBitsPixel == 32);
- DrawYUV(frame_in,
- movie_dib_bits,
- dibrowbytes,
- clipped_width,
- clipped_height,
- scaled_width,
- scaled_height);
-#ifdef TEST_SWSCALER
- }
-#endif
+ DCHECK(bm.bmBitsPixel == 32);
+ DrawYUV(frame_in,
+ movie_dib_bits,
+ dibrowbytes,
+ clipped_width,
+ clipped_height,
+ scaled_width,
+ scaled_height);
}
#ifdef TESTING
double yuv_time_end = GetTime();