diff options
Diffstat (limited to 'video.cpp')
-rw-r--r-- | video.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
@@ -190,15 +190,10 @@ InitAV(char *filename, av_info *AV) av_seek_frame(AV->FileFormatContext, -1, 0, AVSEEK_FLAG_BACKWARD); }; -#if PACKEDRGB internal void -Store4x4Chunk(pixel_buffer *Raster); +Convert4x4Chunk(pixel_buffer *Raster, uint8); internal void -SSE_ClearBuffer(pixel_buffer *Raster, uint16); -#else -internal void -Libav_GBRAToRGBA(pixel_buffer *Raster); -#endif +ClearBuffer(pixel_buffer *Raster, void *); internal int16 LoadVideoFrame(video_source *Source, memory *Memory, int32 TimelineFrame) @@ -261,11 +256,7 @@ LoadVideoFrame(video_source *Source, memory *Memory, int32 TimelineFrame) // NOTE(fox): This function will be replaced in the future. AV->RGBContext = sws_getContext(AV->VideoFrame->width, AV->VideoFrame->height, (AVPixelFormat)AV->VideoFrame->format, -#if PACKEDRGB AV->VideoFrame->width, AV->VideoFrame->height, AV_PIX_FMT_RGBA, SWS_BILINEAR, -#else - AV->VideoFrame->width, AV->VideoFrame->height, AV_PIX_FMT_GBRAP, SWS_BILINEAR, -#endif NULL, NULL, NULL); if(!AV->RGBContext) { @@ -277,13 +268,9 @@ LoadVideoFrame(video_source *Source, memory *Memory, int32 TimelineFrame) av_frame_unref(AV->VideoFrame); -#if PACKEDRGB - Store4x4Chunk(Buffer); - SSE_CopyToBuffer(Buffer, 1); - SSE_ClearBuffer(Buffer, 1); -#else - Libav_GBRAToRGBA(Buffer); -#endif + Convert4x4Chunk(Buffer, 0); + CopyToBuffer(Buffer, 1); + ClearBuffer(Buffer, Buffer->EffectBuffer); return 0; } |