summaryrefslogtreecommitdiff
path: root/libavcodec/h261enc.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc: support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encodersAnton Khirnov2023-01-291-0/+1
| | | | Including fake-delay encoders marked with FF_CODEC_CAP_EOF_FLUSH.
* avcodec/mpegvideo_enc: remove picture_number parameter from encode functionsMarton Balint2023-01-261-1/+1
| | | | | | They are unused. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/h261enc: Store the H.261 format valueAndreas Rheinhardt2022-10-061-24/+15
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Move H.261 size check to h261enc.cAndreas Rheinhardt2022-10-061-1/+10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt2022-09-031-1/+1
| | | | | | | | It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Inline values in ff_update_block_index()Andreas Rheinhardt2022-07-311-1/+1
| | | | | | | | | This is possible for most of the callers, because e.g. only the MPEG-4 decoder can have bits_per_raw_sample > 8. Also most mpegvideo-based codecs are 420 only. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Make init-threadsafety the defaultAndreas Rheinhardt2022-07-181-1/+1
| | | | | | | | | | | and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-051-1/+1
| | | | | | | | | | | This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-211-7/+7
| | | | | | | | | | | | | | | | Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-211-0/+1
| | | | | | | | | | Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move encoder-only stuff to a new headerAndreas Rheinhardt2022-02-131-0/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h261enc: Pass PutBitContext directly in h261_encode_motion()Andreas Rheinhardt2022-02-131-7/+6
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h261: Move encoder-only stuff to a new headerAndreas Rheinhardt2022-02-131-0/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h261: Separate decode and encode contextsAndreas Rheinhardt2022-02-131-20/+34
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Remove unnecessary h263.h inclusionsAndreas Rheinhardt2022-01-091-1/+0
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Deduplicate ff_mpv_generic_options-based AVClassesAndreas Rheinhardt2021-07-081-8/+1
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h261enc: Make encoder init-threadsafeAndreas Rheinhardt2021-01-251-4/+12
| | | | | | | | This is easy now that the H.261 encoder is the only user that initializes the non-VLC parts of ff_h261_rl_tcoeff. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h261enc: Remove unused function parameterAndreas Rheinhardt2020-12-081-3/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* put_bits: make avpriv_align_put_bits() inlineAnton Khirnov2020-10-281-1/+1
| | | | | | | | | This function is so extremely simple that it is preferable to make it inline rather than deal with all the complications arising from it being an exported symbol. Keep avpriv_align_put_bits() around until the next major bump to preserve ABI compatibility.
* avcodec: Add FF_CODEC_CAP_INIT_CLEANUPLimin Wang2020-05-271-0/+1
| | | | | | | | | | then ff_mpv_encode_end() will be unnecessary in ff_mpv_encode_init() if it's failed. The FF_CODEC_CAP_INIT_CLEANUP flag is need for single thread, For multithread, it'll be cleanup still by AV_CODEC_CAP_FRAME_THREADS flag if have. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '02b7c630875c0bc63cee5ec597aa33baf9bf4e20'Michael Niedermayer2015-07-091-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '02b7c630875c0bc63cee5ec597aa33baf9bf4e20': h261: Signal freeze picture release for intra frames Conflicts: tests/ref/vsynth/vsynth1-h261 tests/ref/vsynth/vsynth2-h261 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h261: Signal freeze picture release for intra framesStian Selnes2015-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Freeze picture release should be set to 1 when we're responding to a fast update request. For simplicity we set it for all intra frames, including those that starts a GOP. Fixes issue where Tandberg MXP1700 does not recover from packet loss state since it's waiting for the freeze picture relase indication. Bug-Id: 873 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'dc1de0b958836545339611e9c050a1d4fdded263'Michael Niedermayer2015-07-091-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'dc1de0b958836545339611e9c050a1d4fdded263': h261: Set 'still image mode off' in picture header Conflicts: tests/ref/vsynth/vsynth1-h261 tests/ref/vsynth/vsynth2-h261 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h261: Set 'still image mode off' in picture headerStian Selnes2015-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref H.261 recommendation section 4.2.1.3, setting the still image flag to 1 disables still image mode. Some decoders require this in order to decode the bitstream as normal video. Fixes H.261 calls to Cisco E20. Also, reserved (aka spare) bits should be set to 1 unless specified otherwise. Bug-Id: 872 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'f1fa1eed2abdc8dfb0af318a43f5d293b81141bd'Michael Niedermayer2015-06-121-1/+6
|\ \ | |/ | | | | | | | | | | * commit 'f1fa1eed2abdc8dfb0af318a43f5d293b81141bd': mpegvideo: Expand macro Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: Expand macroVittorio Giovara2015-06-121-1/+6
| | | | | | | | | | | | Having this macro in an header only facilitates the use of such header. The code increase is minimal and files have one less dependency on mpegvideo.h.
* | Merge commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61'Michael Niedermayer2015-06-011-0/+1
|\ \ | |/ | | | | | | | | | | * commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61': mpegvideo: Move tables to a separate file Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: Move tables to a separate fileVittorio Giovara2015-05-311-0/+1
| |
* | avcodec/h261enc: Fix number suffixMichael Niedermayer2015-02-011-2/+2
| | | | | | | | | | Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h261enc: More specific return codeMichael Niedermayer2015-01-311-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h261enc: Avoid casts, Simplify codeMichael Niedermayer2015-01-311-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h261enc: fix dquant encodingMichael Niedermayer2015-01-311-3/+6
| | | | | | | | | | | | Fixes Ticket4111 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '835f798c7d20bca89eb4f3593846251ad0d84e4b'Michael Niedermayer2014-08-151-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '835f798c7d20bca89eb4f3593846251ad0d84e4b': mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes Conflicts: libavcodec/h261dec.c libavcodec/intrax8.c libavcodec/mjpegenc.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpeg4videoenc.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/x86/mpegvideoenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixesDiego Biurrun2014-08-151-3/+3
| |
* | Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'Michael Niedermayer2014-03-171-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b': mpegvideo: move mpegvideo formats-related defines to mpegutils.h Conflicts: libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_mvpred.h libavcodec/svq1enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: move mpegvideo formats-related defines to mpegutils.hVittorio Giovara2014-03-161-0/+1
| |
* | avcodec/h261enc: dont use current_mv_x/yMichael Niedermayer2013-11-201-13/+12
| | | | | | | | | | | | | | Fixes -mbd rd Fixes Ticket3151 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h261enc: avoid use of current/previous_mbaMichael Niedermayer2013-11-201-12/+14
| | | | | | | | | | | | Fixes part of Ticket3151 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h261enc: remove unused variablesMichael Niedermayer2013-11-181-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h261: trellis quantization supportMichael Niedermayer2013-11-171-0/+50
| | | | | | | | | | | | Fixes ticket3143 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-1/+1
| |
* | Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'Michael Niedermayer2013-05-051-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487': avcodec: Add av_cold attributes to init functions missing them Conflicts: libavcodec/aacpsy.c libavcodec/atrac3.c libavcodec/dvdsubdec.c libavcodec/ffv1.c libavcodec/ffv1enc.c libavcodec/h261enc.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/h264pred.c libavcodec/libschroedingerenc.c libavcodec/libxvid_rc.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/proresdsp.c libavcodec/rangecoder.c libavcodec/videodsp.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-1/+2
| |
* | Merge commit '20429ba96e55db17ac57f6c0e330914287f1f614'Michael Niedermayer2013-04-111-6/+1
|\ \ | |/ | | | | | | | | | | * commit '20429ba96e55db17ac57f6c0e330914287f1f614': h261: Move encoder/decoder shared table init to common code Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h261: Move encoder/decoder shared table init to common codeDiego Biurrun2013-04-101-6/+1
| |
* | Merge commit '8a776ad90e00ab2b98e8683ac6182d641a383c3a'Michael Niedermayer2013-04-111-4/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '8a776ad90e00ab2b98e8683ac6182d641a383c3a': h261: Move shared data tables from a header to a proper C file Conflicts: libavcodec/Makefile libavcodec/h261data.c libavcodec/h261dec.c libavcodec/h261enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>