summaryrefslogtreecommitdiff
path: root/libavcodec/ccaption_dec.c
Commit message (Collapse)AuthorAge
* avcodecc/ccaption_dec: remove extra word from long codec descriptionPaul B Mahol2017-01-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/ccaption_dec: Use simple array instead of AVBufferMichael Niedermayer2016-09-09
| | | | | | | | | | This is simpler and fixes an out of array read, fixing it with AVBuffers would be more complex Fixes: e00d9e6e50e5495cc93fea41147b97bb/asan_heap-oob_12dcdbb_8798_b32a97ea722dd37bb5066812cc674552.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ccaption_dec: default rollup to row 10Aman Gupta2016-07-18
| | | | | | | | | This ensures that captions are written towards the bottom of the screen when tuning into mid-stream. The row will be reset on the receipt of the next PAC command. Row 10 was chosen as it corresponds to the value of "0" in a PAC (see row_map in handle_pac()). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ccaption_dec: implement positioning for closed captionsAman Gupta2016-07-18
| | | | | | Positioning math is based on the guidelines in https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ccaption_dec: change write_char() to void as return value is unusedAman Gupta2016-07-17
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ccaption_dec: Fix mixed declaration and statement.Michael Niedermayer2016-06-28
| | | | | Found-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ccaption_dec: implement tab offset commandsAman Gupta2016-06-28
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/ccaption_dec: remove usage of avctx->time_baseClément Bœsch2016-04-02
| | | | | | | | | | lavc/utils already rescales avpkt->pts to sub->pts in AV_TIME_BASE_Q before calling the decode callback. This prevents from rescaling again into the decoder, and avoid the use of avctx->time_base which will disappear in the incoming codecpar merge. This commit also replaces the use of "20 centisecond" (ass time base) with "200 ms".
* lavc/options: add ass_ro_flush_noop to flags2Clément Bœsch2016-02-26
|
* lavc: allow subtitle text format to be ASS without timingClément Bœsch2016-02-26
|
* lavc/ccaption_dec: implement special and extended character setsAman Gupta2016-02-17
| | | | character sets implemented as defined in https://en.wikipedia.org/wiki/EIA-608#Characters
* lavc/ccaption_dec: do not ignore repeated character commandsAman Gupta2016-02-17
| | | | | | | | | | | control codes in a cc stream can be repeated, and must be ignored. however, repeated characters must not be ignored. the code attempted to wipe prev_cmd in handle_char to allow repeated characters to be processed, but prev_cmd would previously get reset _after_ handle_char() i also moved the prev_cmd reset out from handle_char() so it can be re-used for special character sets, which _must_ be ignored when repeated.
* avcodec/ccaption_dec: Fix mixed declarations and codeMichael Niedermayer2016-01-19
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/ccaption_dec: clear all unused rows during rollupAman Gupta2016-01-14
| | | | | | Sometimes rollup captions can move around the screen. This fixes "ghost" captions from below the current rollup area from continuing to be captured when a rollup moves higher up on the screen.
* lavc/ccaption_dec: clean up whitespaceAman Gupta2016-01-14
|
* lavc/ccaption_dec: implement real_time optionAman Gupta2016-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new mode is useful for realtime decoding of closed captions so they can be display along with mpeg2 frames. Closed caption streams contain two major types of captions: - POPON captions, which are buffered off-screen and displayed only after EOC (end of caption, aka display buffer) - PAINTON/ROLLUP captions, which are written to the display as soon as they arrive. In a typical real-time eia608 decoder, commands like EOC (end of caption; display buffer), EDM (erase display memory) and EBM (erase buffered memory) perform their expected functions as soon as the commands are processed. This is implemented in the real_time branches added in this commit. Before this commit, and in the !real_time branches after this commit, the decoder cleverly implements its own version of the decoder which is specifically geared towards buffered decoding. It does so by actively ignoring commands like EBM (erase buffered memory), and then re-using the non-display buffer to hold the previous caption while the new one is received. This is the opposite of the real-time decoder, which uses the non-display buffer to hold the new caption while the display buffer is still showing the current caption. In addition to ignoring EBM, the buffered decoder also has custom implementations for EDM and EOC. An EDM (erase display memory) command flushes the existing contents before clearing the screen, and EOC similarly always flushes the active buffer (the previous subtitle) before flipping buffers.
* lavc/ccaption_dec: flush context on seekAman Gupta2016-01-14
|
* lavc/ccaption_dec: improve default styleClément Bœsch2016-01-10
| | | | Use monospaced font, and a black box outline.
* lavc/ccaption_dec: fix ASS tagsClément Bœsch2016-01-10
|
* lavc/ccaption_dec: simplify rollup casesClément Bœsch2016-01-09
|
* lavc/ccaption_dec: check for bprint completeness outside the loopClément Bœsch2016-01-09
|
* lavc/ccaption_dec: mark row and font as const in capture_screen()Clément Bœsch2016-01-09
|
* lavc/ccaption_dec: fix mixed declarations and code warningClément Bœsch2016-01-09
|
* lavc/ccaption_dec: check for bprint completeness only at the endClément Bœsch2016-01-09
|
* lavc/ccaption_dec: implement font stylesAman Gupta2016-01-09
|
* lavc/ccaption_dec: simplify by incrementing cursor_column inside write_char()Aman Gupta2016-01-09
|
* lavc/ccaption_dec: simplify by passing screen into write_char()Aman Gupta2016-01-09
|
* lavc/ccaption_dec: extract capture_screen() for future useAman Gupta2016-01-09
| | | | | | unlike reap_screen(), capture_screen() can be used to populate buffer without touching the timestamps. this is useful for upcoming commits which implement a real time caption stream.
* lavc/ccaption_dec: clear buffer before populating with screen contentsAman Gupta2016-01-09
|
* lavc/ccaption_dec: centralize buffer_changed=1 into reap_screenAman Gupta2016-01-09
|
* lavc/ccaption_dec: rename screen_changed to buffer_changedAman Gupta2016-01-09
|
* lavc/ccaption_dec: extract ass time base into constantAman Gupta2016-01-09
|
* lavc/ccaption_dec: combine ROLLUP modes as they are identicalAman Gupta2016-01-09
|
* Revert "lavc/ccaption_dec: reap_screen() is responsible for clearing output ↵Aman Gupta2016-01-09
| | | | | | buffer and signaling screen_changed" This reverts commit 53ee84f811c3a3e55c688116d41310e76d285d9e.
* Revert "lavc/ccaption_dec: implement "erase non displayed memory""Aman Gupta2016-01-09
| | | | This reverts commit 26abdd61a39735c7907297e9b5c8bfe5255be555.
* Revert "lavc/ccaption_dec: reap_screen is not necessary when clearing screen ↵Aman Gupta2016-01-09
| | | | | | or buffer" This reverts commit fe225b113b0553cdcf1a1d2fbdbe37c467d7951b.
* lavc/ccaption_dec: reap_screen is not necessary when clearing screen or bufferAman Gupta2016-01-08
|
* lavc/ccaption_dec: implement "erase non displayed memory"Aman Gupta2016-01-08
|
* lavc/ccaption_dec: reap_screen() is responsible for clearing output buffer ↵Aman Gupta2016-01-08
| | | | | | | | and signaling screen_changed moves the screen_changed bit and the bprint_clear into reap_screen() so the logic is centralized and callers do not need to touch the bit or the buffer before calling reap_screen()
* lavc/ccaption_dec: remove unused return value from internal functionsAman Gupta2016-01-08
|
* lavc/ccaption_dec: clean up whitespaceAman Gupta2016-01-08
|
* lavu: rename and move ff_parity to av_parityJames Almer2016-01-07
| | | | | | | av_popcount is not defined in intmath.h. Reviewed-by: ubitux Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/ccaption_dec: use ff_parity()Clément Bœsch2016-01-07
|
* lavc/ccaption_dec: fix always true conditionClément Bœsch2016-01-07
| | | | No idea why this wasn't ever detected by a static analyzer.
* libavcodec/ccaption_dec: rewrite packet handler as case statement; remove ↵Aman Gupta2016-01-06
| | | | | | COR3 macro Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/ccaption_dec: clean up and standardize white spaceAman Gupta2016-01-06
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/ccaption_dec: remove unnecessary includeAman Gupta2016-01-05
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Replace av_dlog with ff_dlog.Ronald S. Bultje2015-08-18
| | | | | ff_dlog checks compilability, and is non-public. av_dlog is deprecated and no longer exists if FF_API_DLOG=0.
* avcodec/ccaption_dec: correcting line breaks in ccAnshul Maheshwari2015-05-03
| | | | | | Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com> Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/ccaption_dec: Remove the GOTO statementPranav Vaish2015-04-02
|