Unified · Split
| @@ -664,8 +664,8 @@ OBJS-$(CONFIG_TTA_ENCODER) += ttaenc.o ttaencdsp.o ttadata.o · 663 unmodified lines | ||
| 664 | 664 | OBJS-$(CONFIG_TWINVQ_DECODER) += twinvqdec.o twinvq.o |
| 665 | 665 | OBJS-$(CONFIG_TXD_DECODER) += txd.o |
| 666 | 666 | OBJS-$(CONFIG_ULTI_DECODER) += ulti.o |
| 667 | −OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideodec.o utvideo.o utvideodsp.o | |
| 668 | −OBJS-$(CONFIG_UTVIDEO_ENCODER) += utvideoenc.o utvideo.o | |
| 667 | +OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideodec.o utvideodsp.o | |
| 668 | +OBJS-$(CONFIG_UTVIDEO_ENCODER) += utvideoenc.o | |
| 669 | 669 | OBJS-$(CONFIG_V210_DECODER) += v210dec.o |
| 670 | 670 | OBJS-$(CONFIG_V210_ENCODER) += v210enc.o |
| 671 | 671 | OBJS-$(CONFIG_V210X_DECODER) += v210x.o |
| @@ -1,39 +0,0 @@ | ||
| 1 | −/* | |
| 2 | − * Common Ut Video code | |
| 3 | − * Copyright (c) 2011 Konstantin Shishkov | |
| 4 | − * | |
| 5 | − * This file is part of FFmpeg. | |
| 6 | − * | |
| 7 | − * FFmpeg is free software; you can redistribute it and/or | |
| 8 | − * modify it under the terms of the GNU Lesser General Public | |
| 9 | − * License as published by the Free Software Foundation; either | |
| 10 | − * version 2.1 of the License, or (at your option) any later version. | |
| 11 | − * | |
| 12 | − * FFmpeg is distributed in the hope that it will be useful, | |
| 13 | − * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 15 | − * Lesser General Public License for more details. | |
| 16 | − * | |
| 17 | − * You should have received a copy of the GNU Lesser General Public | |
| 18 | − * License along with FFmpeg; if not, write to the Free Software | |
| 19 | − * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 20 | − */ | |
| 21 | − | |
| 22 | −/** | |
| 23 | − * @file | |
| 24 | − * Common Ut Video code | |
| 25 | − */ | |
| 26 | − | |
| 27 | −#include "utvideo.h" | |
| 28 | − | |
| 29 | −#if FF_API_PRIVATE_OPT | |
| 30 | −const int ff_ut_pred_order[5] = { | |
| 31 | − PRED_LEFT, PRED_MEDIAN, PRED_MEDIAN, PRED_NONE, PRED_GRADIENT | |
| 32 | −}; | |
| 33 | −#endif | |
| 34 | − | |
| 35 | −int ff_ut_huff_cmp_len(const void *a, const void *b) | |
| 36 | −{ | |
| 37 | − const HuffEntry *aa = a, *bb = b; | |
| 38 | − return (aa->len - bb->len)*256 + aa->sym - bb->sym; | |
| 39 | −} | |
| @@ -61,9 +61,6 @@ enum { · 60 unmodified lines | ||
| 61 | 61 | UTVIDEO_444 = MKTAG('Y', 'V', '2', '4'), |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | −/* Mapping of libavcodec prediction modes to Ut Video's */ | |
| 65 | −extern const int ff_ut_pred_order[5]; | |
| 66 | − | |
| 67 | 64 | typedef struct UtvideoContext { |
| 68 | 65 | const AVClass *class; |
| 69 | 66 | AVCodecContext *avctx; |
| @@ -91,13 +88,4 @@ typedef struct UtvideoContext { · 21 unmodified lines | ||
| 91 | 88 | size_t control_stream_size[4][256]; |
| 92 | 89 | } UtvideoContext; |
| 93 | 90 | |
| 94 | −typedef struct HuffEntry { | |
| 95 | − uint16_t sym; | |
| 96 | − uint8_t len; | |
| 97 | − uint32_t code; | |
| 98 | −} HuffEntry; | |
| 99 | − | |
| 100 | −/* Compare huffman tree nodes */ | |
| 101 | −int ff_ut_huff_cmp_len(const void *a, const void *b); | |
| 102 | − | |
| 103 | 91 | #endif /* AVCODEC_UTVIDEO_H */ |
| @@ -37,6 +37,25 @@ · 36 unmodified lines | ||
| 37 | 37 | #include "utvideo.h" |
| 38 | 38 | #include "huffman.h" |
| 39 | 39 | |
| 40 | +typedef struct HuffEntry { | |
| 41 | + uint16_t sym; | |
| 42 | + uint8_t len; | |
| 43 | + uint32_t code; | |
| 44 | +} HuffEntry; | |
| 45 | + | |
| 46 | +#if FF_API_PRIVATE_OPT | |
| 47 | +static const int ut_pred_order[5] = { | |
| 48 | + PRED_LEFT, PRED_MEDIAN, PRED_MEDIAN, PRED_NONE, PRED_GRADIENT | |
| 49 | +}; | |
| 50 | +#endif | |
| 51 | + | |
| 52 | +/* Compare huffman tree nodes */ | |
| 53 | +static int ut_huff_cmp_len(const void *a, const void *b) | |
| 54 | +{ | |
| 55 | + const HuffEntry *aa = a, *bb = b; | |
| 56 | + return (aa->len - bb->len)*256 + aa->sym - bb->sym; | |
| 57 | +} | |
| 58 | + | |
| 40 | 59 | /* Compare huffentry symbols */ |
| 41 | 60 | static int huff_cmp_sym(const void *a, const void *b) |
| 42 | 61 | { |
| @@ -139,7 +158,7 @@ FF_DISABLE_DEPRECATION_WARNINGS · 96 unmodified lines | ||
| 139 | 158 | |
| 140 | 159 | /* Convert from libavcodec prediction type to Ut Video's */ |
| 141 | 160 | if (avctx->prediction_method) |
| 142 | − c->frame_pred = ff_ut_pred_order[avctx->prediction_method]; | |
| 161 | + c->frame_pred = ut_pred_order[avctx->prediction_method]; | |
| 143 | 162 | FF_ENABLE_DEPRECATION_WARNINGS |
| 144 | 163 | #endif |
| 145 | 164 | |
| @@ -340,7 +359,7 @@ static void calculate_codes(HuffEntry *he) · 194 unmodified lines | ||
| 340 | 359 | int last, i; |
| 341 | 360 | uint32_t code; |
| 342 | 361 | |
| 343 | − qsort(he, 256, sizeof(*he), ff_ut_huff_cmp_len); | |
| 362 | + qsort(he, 256, sizeof(*he), ut_huff_cmp_len); | |
| 344 | 363 | |
| 345 | 364 | last = 255; |
| 346 | 365 | while (he[last].len == 255 && last) |