mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
eatgv: cosmetics, reformat
This commit is contained in:
parent
ade402804a
commit
4b7598e2fe
@ -50,7 +50,8 @@ typedef struct TgvContext {
|
||||
int num_blocks_packed; ///< current length of block_codebook
|
||||
} TgvContext;
|
||||
|
||||
static av_cold int tgv_decode_init(AVCodecContext *avctx){
|
||||
static av_cold int tgv_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
TgvContext *s = avctx->priv_data;
|
||||
s->avctx = avctx;
|
||||
avctx->time_base = (AVRational){1, 15};
|
||||
@ -62,7 +63,9 @@ static av_cold int tgv_decode_init(AVCodecContext *avctx){
|
||||
* Unpack buffer
|
||||
* @return 0 on success, -1 on critical buffer underflow
|
||||
*/
|
||||
static int unpack(const uint8_t *src, const uint8_t *src_end, unsigned char *dst, int width, int height) {
|
||||
static int unpack(const uint8_t *src, const uint8_t *src_end,
|
||||
unsigned char *dst, int width, int height)
|
||||
{
|
||||
unsigned char *dst_end = dst + width*height;
|
||||
int size, size1, size2, offset, run;
|
||||
unsigned char *dst_start = dst;
|
||||
@ -135,7 +138,9 @@ static int unpack(const uint8_t *src, const uint8_t *src_end, unsigned char *dst
|
||||
* Decode inter-frame
|
||||
* @return 0 on success, -1 on critical buffer underflow
|
||||
*/
|
||||
static int tgv_decode_inter(TgvContext * s, const uint8_t *buf, const uint8_t *buf_end){
|
||||
static int tgv_decode_inter(TgvContext *s, const uint8_t *buf,
|
||||
const uint8_t *buf_end)
|
||||
{
|
||||
int num_mvs;
|
||||
int num_blocks_raw;
|
||||
int num_blocks_packed;
|
||||
@ -213,8 +218,8 @@ static int tgv_decode_inter(TgvContext * s, const uint8_t *buf, const uint8_t *b
|
||||
int mx = x * 4 + s->mv_codebook[vector][0];
|
||||
int my = y * 4 + s->mv_codebook[vector][1];
|
||||
|
||||
if ( mx < 0 || mx + 4 > s->avctx->width
|
||||
|| my < 0 || my + 4 > s->avctx->height)
|
||||
if (mx < 0 || mx + 4 > s->avctx->width ||
|
||||
my < 0 || my + 4 > s->avctx->height)
|
||||
continue;
|
||||
|
||||
src = s->last_frame.data[0] + mx + my * s->last_frame.linesize[0];
|
||||
|
Loading…
Reference in New Issue
Block a user