Michael Niedermayer
cf8d9b74f3
imgconvert: use get_pix_fmt_score in avcodec_find_best_pix_fmt_of_2()
...
This fixes various poorly choosen pixel format cases.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-10 02:15:13 +01:00
Michael Niedermayer
13ae02d03f
imgconvert: add get_pix_fmt_score()
...
get_pix_fmt_score() returns a score representing the amount
of loss when converting a pixel format
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-10 02:14:52 +01:00
Michael Niedermayer
ffbe19fc84
Merge commit '35685a3c2a1ec09f3c62dcfc4368fe9e92bcddf6'
...
* commit '35685a3c2a1ec09f3c62dcfc4368fe9e92bcddf6':
dsputil: Move ff_shrink* function declarations to separate header
dsputil: Move ff_svq3 function declarations to a separate header
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-09 13:46:03 +01:00
Diego Biurrun
35685a3c2a
dsputil: Move ff_shrink* function declarations to separate header
2013-02-07 22:08:19 +01:00
Michael Niedermayer
2ad1eb1907
imgconvert: fix 2 "discards const qualifier from pointer target type"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-26 01:36:00 +01:00
Michael Niedermayer
2eab1a178c
imgconvert: dont depend on default return type for get_color_type()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-26 01:34:26 +01:00
Michael Niedermayer
0efcf16a3e
replace av_log(0, by av_log(NULL,
...
The first parameter is a pointer and NULL is more correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-23 18:10:02 +01:00
Michael Niedermayer
b93c933cd2
imgconvert-test: count the number of unused pixel format values.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 20:25:30 +01:00
Michael Niedermayer
fb1bb97d87
imgconvert-test: skip pix formats without name
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 20:25:30 +01:00
Michael Niedermayer
2c5d911166
imgconvert-test: test alpha flags
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 20:07:34 +01:00
Michael Niedermayer
c9ad2e9aa3
imgconvert: remove avg_bits_per_pixel(), its redundant
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 20:07:17 +01:00
Michael Niedermayer
b044e81f06
Merge commit 'ae3822bca16f1cdb2460a35b16f8ef636a04314e'
...
* commit 'ae3822bca16f1cdb2460a35b16f8ef636a04314e':
imgconvert: remove PixFmtInfo
Conflicts:
libavcodec/imgconvert.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 18:03:04 +01:00
Michael Niedermayer
6ff544e473
imgconvert: fix color type for non normal pix_fmts like HW stuff and unused entries.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:44:16 +01:00
Michael Niedermayer
6adf97fe00
avcodec_get_pix_fmt_loss: remove PixFmtInfo use
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:44:16 +01:00
Michael Niedermayer
fc04c99dea
imgconvert: print color type too
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:44:16 +01:00
Michael Niedermayer
f6c4395374
imgconvert: remove PixFmtInfo use from avg_bits_per_pixel()
...
This fixes several inconsistencies with YUV >8bit formats caused
due to missing information in the PixFmtInfo table.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:06:11 +01:00
Michael Niedermayer
0880f26bbe
avcodec_find_best_pix_fmt_of_2: favor formats with fewer components if it does not incur a loss.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:06:11 +01:00
Michael Niedermayer
ad9333d5ef
imgconvert-test: add avg bits per pixel
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:03:31 +01:00
Michael Niedermayer
0efa240f2b
is_yuv_planar: remove use of PixFmtInfo
...
This fixes the behavior for a few yuva 16bit formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:03:31 +01:00
Michael Niedermayer
be19e7e373
imgconvert: add self test code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 17:03:31 +01:00
Michael Niedermayer
494945cb66
Merge commit 'd1d9efaae6c7e8466b06c30ca21c6b569dd2e480'
...
* commit 'd1d9efaae6c7e8466b06c30ca21c6b569dd2e480':
avcodec: split avpicture from imgconvert
pixdesc: add PIX_FMT_ALPHA flag
Conflicts:
libavcodec/imgconvert.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 15:37:01 +01:00
Luca Barbato
ae3822bca1
imgconvert: remove PixFmtInfo
...
It is pleonastic and was used in stale functions pending replacement.
2012-11-20 12:45:58 +01:00
Luca Barbato
d1d9efaae6
avcodec: split avpicture from imgconvert
...
All the non deprecated functions are in avpicture.c now.
2012-11-20 12:45:58 +01:00
Michael Niedermayer
d4e74d5d6d
Remove deprecation of avcodec_get_chroma_sub_sample.
...
Add explanations what the difference between the 2 functions are and
when either should be used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 12:04:39 +01:00
Michael Niedermayer
e13d5e9a4b
Merge commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2'
...
* commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2':
x86: h264_weight_10bit: port to cpuflags
libtheoraenc: add missing pixdesc.h header
avcodec: remove ff_is_hwaccel_pix_fmt
pixdesc: add av_pix_fmt_get_chroma_sub_sample
hlsenc: stand alone hls segmenter
Conflicts:
doc/muxers.texi
libavcodec/ffv1enc.c
libavcodec/imgconvert.c
libavcodec/mpegvideo_enc.c
libavcodec/tiffenc.c
libavformat/Makefile
libavformat/allformats.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 11:59:20 +01:00
Luca Barbato
cc085993f4
avcodec: remove ff_is_hwaccel_pix_fmt
...
It is used only in one place and is unlikely it would be needed
elsewhere.
2012-11-13 16:21:47 +01:00
Michael Niedermayer
0e4d34e087
pix_fmt_info: add 9/10 bit YUVA formats
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 03:10:35 +01:00
Paul B Mahol
b90d7840df
lavc: const correctness for avpicture_fill()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-30 18:40:24 +00:00
Michael Niedermayer
8cda27b753
avcodec_find_best_pix_fmt_of_2: fix handling or PIX_FMT_NONE
...
Fixes CID733775
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 00:08:44 +02:00
Michael Niedermayer
af7dd79a32
Merge commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5'
...
* commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5':
lavc: do not use av_pix_fmt_descriptors directly.
Conflicts:
libavcodec/imgconvert.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/mpegvideo.c
libavcodec/rawdec.c
libavcodec/rawenc.c
libavcodec/tiffenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 16:48:26 +02:00
Anton Khirnov
50ba57e0ce
lavc: do not use av_pix_fmt_descriptors directly.
2012-10-12 12:45:39 +02:00
Michael Niedermayer
ac627b3d38
Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
...
* commit '716d413c13981da15323c7a3821860536eefdbbb':
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Conflicts:
doc/examples/muxing.c
ffmpeg.h
ffmpeg_filter.c
ffmpeg_opt.c
ffplay.c
ffprobe.c
libavcodec/8bps.c
libavcodec/aasc.c
libavcodec/aura.c
libavcodec/avcodec.h
libavcodec/avs.c
libavcodec/bfi.c
libavcodec/bmp.c
libavcodec/bmpenc.c
libavcodec/c93.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dpx.c
libavcodec/dpxenc.c
libavcodec/eatgv.c
libavcodec/escape124.c
libavcodec/ffv1.c
libavcodec/flashsv.c
libavcodec/fraps.c
libavcodec/h264.c
libavcodec/huffyuv.c
libavcodec/iff.c
libavcodec/imgconvert.c
libavcodec/indeo3.c
libavcodec/kmvc.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libx264.c
libavcodec/ljpegenc.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc.c
libavcodec/motionpixels.c
libavcodec/mpeg12.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo_enc.c
libavcodec/pamenc.c
libavcodec/pcxenc.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/pnm.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/ptx.c
libavcodec/qdrw.c
libavcodec/qpeg.c
libavcodec/qtrleenc.c
libavcodec/raw.c
libavcodec/rawdec.c
libavcodec/rl2.c
libavcodec/sgidec.c
libavcodec/sgienc.c
libavcodec/snowdec.c
libavcodec/snowenc.c
libavcodec/sunrast.c
libavcodec/targa.c
libavcodec/targaenc.c
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/tmv.c
libavcodec/truemotion2.c
libavcodec/utils.c
libavcodec/vb.c
libavcodec/vp3.c
libavcodec/wnv1.c
libavcodec/xl.c
libavcodec/xwddec.c
libavcodec/xwdenc.c
libavcodec/yop.c
libavdevice/v4l2.c
libavdevice/x11grab.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/buffersrc.c
libavfilter/drawutils.c
libavfilter/formats.c
libavfilter/src_movie.c
libavfilter/vf_ass.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_format.c
libavfilter/vf_hflip.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_transpose.c
libavfilter/vf_yadif.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavformat/movenc.c
libavformat/mxf.h
libavformat/utils.c
libavformat/yuv4mpeg.c
libavutil/imgutils.c
libavutil/pixdesc.c
libswscale/input.c
libswscale/output.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
libswscale/x86/swscale_template.c
libswscale/x86/yuv2rgb.c
libswscale/x86/yuv2rgb_template.c
libswscale/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
2012-10-08 07:13:26 +02:00
Michael Niedermayer
7ed9ec033f
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
dwt: Drop unused functions spatial_compose{53|97}i()
nutdec: Remove unused and broken debug function stub
avcodec: Drop long-deprecated imgconvert.h header
Add Opus support to the Ogg muxer.
Add Opus codec id and codec description.
avformat: Identify anonymous AVIO typedef structs.
Conflicts:
libavcodec/avcodec.h
libavcodec/codec_desc.c
libavcodec/imgconvert.h
libavcodec/version.h
libavformat/oggenc.c
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 05:11:19 +02:00
Diego Biurrun
0ae3ba8daa
avcodec: Drop long-deprecated imgconvert.h header
2012-09-27 12:02:33 +02:00
Michael Niedermayer
9afd55922a
imgconvert: silence some const incompatible pointer warnings.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 18:44:42 +02:00
Michael Niedermayer
dfb4757bbe
lavc: support building with the forks ABI for avcodec_find_best_pix_fmt2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 21:35:40 +02:00
Michael Niedermayer
2a54ae9df8
imgconvert: add avcodec_find_best_pix_fmt_of_2()
...
and deprecate avcodec_find_best_pix_fmt2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 21:35:39 +02:00
Michael Niedermayer
c617bed34f
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
MSS1 and MSS2: set final pixel format after common stuff has been initialised
MSS2 decoder
configure: handle --disable-asm before check_deps
x86: Split inline and external assembly #ifdefs
configure: x86: Separate inline from standalone assembler capabilities
pktdumper: Use a custom define instead of PATH_MAX for buffers
pktdumper: Use av_strlcpy instead of strncpy
pktdumper: Use sizeof(variable) instead of the direct buffer length
Conflicts:
Changelog
configure
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/codec_desc.c
libavcodec/dct-test.c
libavcodec/imgconvert.c
libavcodec/mss12.c
libavcodec/version.h
libavfilter/x86/gradfun.c
libswscale/x86/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 13:34:32 +02:00
Diego Biurrun
17337f54c0
x86: Split inline and external assembly #ifdefs
2012-08-31 01:53:25 +02:00
Michael Niedermayer
c581cb4e4f
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
Fix even more missing includes after the common.h removal
build: Factor out rangecoder dependencies to CONFIG_RANGECODER
build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
x86: avcodec: Consistently name all init files
Add more missing includes after removing the implicit common.h
Add some more missing includes after removing the implicit common.h
Don't include common.h from avutil.h
rtmp: Automatically compute the hash for SWFVerification
Conflicts:
configure
doc/APIchanges
doc/examples/decoding_encoding.c
libavcodec/Makefile
libavcodec/assdec.c
libavcodec/audio_frame_queue.c
libavcodec/avpacket.c
libavcodec/dv_profile.c
libavcodec/dwt.c
libavcodec/libtheoraenc.c
libavcodec/rawdec.c
libavcodec/rv40dsp.c
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/v210dec.h
libavcodec/vc1dsp.c
libavcodec/x86/Makefile
libavfilter/asrc_anullsrc.c
libavfilter/avfilter.c
libavfilter/buffer.c
libavfilter/formats.c
libavfilter/vf_ass.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_select.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavformat/version.h
libavutil/audioconvert.c
libavutil/error.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Michael Niedermayer
72743aef03
imgconvert: Implement avcodec_find_best_pix_fmt_of_list()
...
The old avcodec_find_best_pix_fmt() was insufficient due to 64 pix_fmt limit.
In ffmpeg this problem has been solved long ago through avcodec_find_best_pix_fmt2()
Today libav has added a incompatible modified version of avcodec_find_best_pix_fmt2()
under the same name, thus again breaking ABI/API ...
The avcodec_find_best_pix_fmt_of_list() added in this commit here makes the libav
API available to ffmpeg users too.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-25 01:25:28 +02:00
Michael Niedermayer
31a192f387
imgconvert: favor pixel formats without resolution loss
...
Fixes Ticket1517
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-18 17:22:17 +02:00
Michael Niedermayer
39afcf1d7e
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
eval: add gt(), gte(), lt() and lte() fate tests
eval: fix swapping of lt() and lte()
imgconvert: deprecate avcodec_find_best_pix_fmt()
imgconvert: add avcodec_find_best_pix_fmt2()
imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt
Conflicts:
libavcodec/imgconvert.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-15 01:23:16 +02:00
Janne Grunau
f30260d32a
imgconvert: deprecate avcodec_find_best_pix_fmt()
2012-07-13 19:22:46 +02:00
Janne Grunau
ac29054fda
imgconvert: add avcodec_find_best_pix_fmt2()
...
The number of pixel formats outgrew the number of available bits in
the bitmask used in avcodec_find_best_pix_fmt().
avcodec_find_best_pix_fmt2() uses a PIX_FMT_NONE terminated list
of pixel formats instead.
2012-07-13 19:22:46 +02:00
Janne Grunau
39bb27bf79
imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt
...
CC: libav-stable@libav.org
2012-07-13 17:29:27 +02:00
Michael Niedermayer
4251a0b84c
imgconvert: add planar RGB formats to pix_fmt_info
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-03 19:03:26 +02:00
Michael Niedermayer
6ca8ef5189
imgconvert: add yuv 9,10,12,14 bit planar YUV formats to pix_fmt_info
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-03 19:03:26 +02:00