Commit Graph

332 Commits

Author SHA1 Message Date
Michael Niedermayer
4ec1cb2497 Merge commit '78670fbf07bd03479073d4218440de4914304680'
* commit '78670fbf07bd03479073d4218440de4914304680':
  imgconvert: cosmetics: Reshuffle defines to reduce ifdeffery

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 12:55:11 +02:00
Diego Biurrun
78670fbf07 imgconvert: cosmetics: Reshuffle defines to reduce ifdeffery 2014-07-21 15:08:01 -07:00
Michael Niedermayer
617e866e25 Move av_find_best_pix_fmt_of_2() from avcodec to avutil
This avoids a dependancy of libavfilter on libavcodec

See Ticket 3592
Fixes Ticket2784

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-30 23:14:05 +02:00
Michael Niedermayer
c486cfab79 avcodec/imgconvert: fix nb_components and depth for PAL8 in get_pix_fmt_score()
This causes us to favor RGB8 over PAL8 when FF_LOSS_COLORQUANT is used

It probably makes sense to reinvestigate the exact scoring of pal8 when
our pal8 support improves to be supperior to rgb8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 19:58:14 +02:00
Michael Niedermayer
672c610d84 Merge commit 'f9279ee74936b4990fc46287c27816ef828cc06c'
* commit 'f9279ee74936b4990fc46287c27816ef828cc06c':
  dsputil: Move ff_zigzag_direct and ff_crop_tab declarations to mathops.h

Conflicts:
	libavcodec/imgconvert.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 22:23:04 +01:00
Michael Niedermayer
d6d3cfb0aa Merge commit '600b854ad8173995518bd917e7f86120b5505088'
* commit '600b854ad8173995518bd917e7f86120b5505088':
  imgconvert: Move ff_deinterlace_line_*_mmx declarations out of dsputil

Conflicts:
	libavcodec/imgconvert.c
	libavcodec/x86/dsputil_x86.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 22:17:54 +01:00
Diego Biurrun
f9279ee749 dsputil: Move ff_zigzag_direct and ff_crop_tab declarations to mathops.h 2014-03-22 06:17:29 -07:00
Diego Biurrun
600b854ad8 imgconvert: Move ff_deinterlace_line_*_mmx declarations out of dsputil 2014-03-22 06:17:29 -07:00
Michael Niedermayer
6016b8329b Merge commit '05563ccacc98fd185affdbf8cbaf094caf36b852'
* commit '05563ccacc98fd185affdbf8cbaf094caf36b852':
  dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl names

Conflicts:
	libavcodec/bit_depth_template.c
	libavcodec/motionpixels_tablegen.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-14 00:39:51 +01:00
Diego Biurrun
05563ccacc dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl names
Also switch from "tbl" to "tab" name suffixes.
2014-03-13 08:12:44 -07:00
Michael Niedermayer
95666b2298 avcodec/imgconvert/get_color_type: fix type for PAL8
Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 19:59:10 +02:00
Dylan Alex Simon
38155b47fd avcodec: add const qualifier to avcodec_find_best_pix_fmt2 args
avcodec_find_best_pix_fmt2 does not modify its first argument so may be
marked const.  This avoids a warning when passing in AVCodec.pix_fmts.

Signed-off-by: Dylan Simon <dylan@dylex.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 16:54:02 +02:00
Michael Bradshaw
9b07d34efb Make avcodec_find_best_pix_fmt_of_list const-correct
Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 12:46:56 +02:00
Stefano Sabatini
5efbeae38c configure: rename have_incompatible_fork_abi -> have_incompatible_libav_abi
"Fork" is an ambiguous term, since there may be more than one fork, also
"fork" could be confused with the corresponding function. Also it seems
important to point the name of the referenced fork in the symbol.

Note: the old --enable-incompatible-fork-abi command is retained for
compatibility, although it should be considered deprecated.
2013-07-03 13:16:33 +02:00
Michael Niedermayer
a2802d3cd4 get_pix_fmt_score: favor equal formats if all else equal
Fixes Ticket2578

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 22:20:20 +02:00
Timothy Gu
a9bbf59be7 cosmetics: Fix "dont" "wont" "doesnt" typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 02:31:16 +02:00
Michael Niedermayer
c7c71f95f8 replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:23:14 +02:00
Michael Niedermayer
ff4680922f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*

Conflicts:
	doc/APIchanges
	libavcodec/avpicture.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/imgconvert.c
	libavcodec/tiffenc.c
	libavfilter/vf_pixdesctest.c
	libavfilter/vf_scale.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libavutil/version.h
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:10:09 +02:00
Anton Khirnov
e6c4ac7b5f pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_* 2013-05-15 07:46:51 +02:00
Michael Niedermayer
a887372109 Merge commit '1399931d07f0f37ef4526eb8d39d33c64e09618a'
* commit '1399931d07f0f37ef4526eb8d39d33c64e09618a':
  x86: dsputil: Rename dsputil_mmx.h --> dsputil_x86.h

Conflicts:
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-14 12:12:20 +02:00
Paul B Mahol
8671e995c8 imgconvert: silence "incompatible pointer type" warning
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-13 14:42:41 +00:00
Diego Biurrun
1399931d07 x86: dsputil: Rename dsputil_mmx.h --> dsputil_x86.h
The header is not (anymore) MMX-specific.
2013-05-12 22:28:07 +02:00
Michael Niedermayer
024a5f72ee Merge commit '9e0f14f16cfc9456a691655fda7d01090bffe47e'
* commit '9e0f14f16cfc9456a691655fda7d01090bffe47e':
  lavc: Make pointers to ff_cropTbl const
  vp3: Embed idct_permutation array directly in VP3DecoderContext

Conflicts:
	libavcodec/bit_depth_template.c
	libavcodec/vp3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 12:47:49 +02:00
Martin Storsjö
9e0f14f16c lavc: Make pointers to ff_cropTbl const
There's no point in these pointers not being const.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-08 12:38:33 +03:00
Michael Niedermayer
f7b041b11b Merge commit '7d42fd6bb9df99a20cf2d0d0e3b166a83a649d08'
* commit '7d42fd6bb9df99a20cf2d0d0e3b166a83a649d08':
  lavc: remove disabled FF_API_FIND_BEST_PIX_FMT cruft

Conflicts:
	libavcodec/avcodec.h
	libavcodec/imgconvert.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 23:08:08 +01:00
Anton Khirnov
7d42fd6bb9 lavc: remove disabled FF_API_FIND_BEST_PIX_FMT cruft 2013-03-09 08:36:40 +01:00
Ronald S. Bultje
54b298fe56 lavc: Deprecate the deinterlace functions in libavcodec
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 09:35:24 +02:00
Ronald S. Bultje
2cffe38df3 Deprecate deinterlaced in libavcodec.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-03 21:11:48 +01:00
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