summaryrefslogtreecommitdiffstats
path: root/sub/draw_bmp.c
Commit message (Collapse)AuthorAgeFilesLines
* draw_bmp: remove swscale bug workaroundwm42012-11-011-3/+1
| | | | | ffmpeg ticket #1852 is fixed with 425c30dda. This didn't actually happen in practice.
* screenshot, draw_bmp: use colorspace passed with mp_imagewm42012-11-011-25/+48
| | | | | Remove the explicit struct mp_csp_details parameters from all related functions, and use mp_image.colorspace/levels instead.
* csputils: better support for integer color valueswm42012-10-281-1/+3
|
* draw_bmp, csputils: use function instead of macrowm42012-10-281-21/+4
|
* draw_bmp: cosmetics, refactorwm42012-10-281-420/+318
| | | | | | | | | | | Mostly pedantic bikeshedding issues. Move some code around, so that the sub_bitmap_to_mp_images() function can be split into two parts. This is better than having a big function with many input and outputs, of which only half are used in each code path. Also, try to make code simpler by using a mp_rect type.
* draw_bmp: remove CONDITIONAL2 codewm42012-10-241-25/+0
| | | | This was sometimes slower, sometimes slightly faster. Remove it.
* options: remove subtitle related options that did nothingwm42012-10-241-0/+1
| | | | | | | Most of these cased working when the OSD was switched to libass, or didn't do anything even before that. Also don't recursively include subreader.h in sub.h.
* draw_bmp: fix IMGFMT_BGR32 useRudolf Polzer2012-10-241-9/+15
|
* draw_bmp: fix for yuy2 formatwm42012-10-241-1/+2
| | | | | | | mp_get_chroma_shift() modifies its argument even if it fails, so we have to restore that. mp_image didn't set chroma shifts for yuy2.
* draw_bmp: don't try to call swscale if image format not supportedwm42012-10-241-0/+3
| | | | If that happens, we silently fail.
* sub: add cache to mp_draw_sub_bitmaps()wm42012-10-241-9/+68
| | | | This caches scaled RGBA sub-bitmaps.
* draw_bmp: compensate for libswscale writing past image boundswm42012-10-241-1/+2
| | | | | | | | | | | | | | | | libswscale tends to overwrite the area between (w,y)-(0,y+1). It tries to process multiple pixels at once, and if the memory past the last x pixel is inside a SIMD operation, but still below the image stride, it overwrites that data with black. This happens with vo_x11 and 32 bit RGBA formats. The bug is visible as black bar right of the subtitle bounding box. Fix by giving libswscale more alignment. Then the "outside" pixels are inside, and are processed normally instead of overwritten with black. NOTE: we do not increase the alignment constant, because this is a separate issue from pointer alignment. libavutil's av_malloc() wouldn't actually satisfy the increased alignment either.
* sub: add helper to draw sub-bitmaps into an imageRudolf Polzer2012-10-241-0/+580
Merged by wm4 from commits 93978f17b76d..13211ef5fc20. Changed copyright header in draw_bmp.c to "mpv", and removed the one in draw_bmp.h.