Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d2c76782e0 | |||
| 4dc8b4d7d0 | |||
| 9ff0467566 | |||
| 4407b38b28 | |||
| 8caaf260a6 | |||
| e1f51bbd1f | |||
| 4b7c149306 | |||
| e8919d6522 | |||
| b017785fa5 | |||
| 01507eb1f8 | |||
| 938ff93710 | |||
| 0c88d539f8 | |||
| e39a992bd1 | |||
| 72a12f61ef | |||
| 30ae080e9d | |||
| dca463b728 | |||
| 25b462cab9 | |||
| 7c6a8afa7e | |||
| b052525f9b | |||
| 90c7bfb9be | |||
| 7bdd348e58 | |||
| af3d003658 | |||
| c00beff5e0 | |||
| 57a43142ba | |||
| 99905118a8 | |||
| dcf560204c | |||
| 5b0e2eb041 | |||
| d461e077a5 | |||
| 9a884b7b97 | |||
| 9abe0bfb7f | |||
| 13682b48e9 | |||
| f25e6e0c25 | |||
| 80239a8bb1 | |||
| 26bbc1c242 | |||
| efe259a27e | |||
| 49f11e12d5 | |||
| d130fae519 | |||
| dde996bf99 | |||
| cad2958fd7 | |||
| 29d61d73b1 | |||
| 9a6a710998 | |||
| daaef403d1 | |||
| 207f5a138a | |||
| e9c8a9aaa6 | |||
| 7b7d8b8794 | |||
| 90d6b563fe | |||
| dce2f820e9 | |||
| 4aab3f868f | |||
| 48609236da | |||
| d8fe695779 | |||
| 0f42e06651 | |||
| 230c4c6ad9 | |||
| f4489c9558 | |||
| 0e5d9fe2a7 | |||
| 9ae2aaea50 | |||
| 2513314912 | |||
| e727cbf0be | |||
| bcc25353cf | |||
| 6a10263f16 | |||
| bcc6429c01 | |||
| bdb219435e | |||
| a7338ae8ac | |||
| 6776c2c04f | |||
| facd3dbc6e | |||
| 8796c3b7d3 | |||
| 7430f3064f | |||
| eac281b06c | |||
| b5210f4eae | |||
| 10379d50be | |||
| cd874cf8e6 | |||
| 82a3e469c6 | |||
| f859fed03d | |||
| 991e6fa35b | |||
| 09dca51066 | |||
| 40de74d0eb | |||
| e2811c2ede | |||
| 25d14b716a | |||
| f1de93dec3 | |||
| 738d68de85 | |||
| 00ecce5c8b | |||
| b920c1d5ad |
@@ -28,6 +28,7 @@ version 2.2:
|
||||
- Support DNx444
|
||||
- libx265 encoder
|
||||
- dejudder filter
|
||||
- Autodetect VDA like all other hardware accelerations
|
||||
|
||||
|
||||
version 2.1:
|
||||
|
||||
@@ -149,7 +149,7 @@ Component options:
|
||||
Hardware accelerators:
|
||||
--disable-dxva2 disable DXVA2 code [autodetect]
|
||||
--disable-vaapi disable VAAPI code [autodetect]
|
||||
--enable-vda enable VDA code
|
||||
--disable-vda disable VDA code [autodetect]
|
||||
--disable-vdpau disable VDPAU code [autodetect]
|
||||
|
||||
Individual component options:
|
||||
@@ -2504,7 +2504,7 @@ enable static
|
||||
enable swscale_alpha
|
||||
|
||||
# Enable hwaccels by default.
|
||||
enable dxva2 vaapi vdpau xvmc
|
||||
enable dxva2 vaapi vda vdpau xvmc
|
||||
|
||||
# build settings
|
||||
SHFLAGS='-shared -Wl,-soname,$$(@F)'
|
||||
@@ -3324,6 +3324,9 @@ if test -n "$sysroot"; then
|
||||
gcc|llvm_gcc|clang)
|
||||
add_cppflags --sysroot="$sysroot"
|
||||
add_ldflags --sysroot="$sysroot"
|
||||
# On Darwin --sysroot may be ignored, -isysroot always affects headers and linking
|
||||
add_cppflags -isysroot "$sysroot"
|
||||
add_ldflags -isysroot "$sysroot"
|
||||
;;
|
||||
tms470)
|
||||
add_cppflags -I"$sysinclude"
|
||||
|
||||
@@ -15,6 +15,9 @@ libavutil: 2012-10-22
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2014-03-18 - e9c8a9a - lsws 2.5.102
|
||||
Make gray16 full-scale.
|
||||
|
||||
2014-xx-xx - xxxxxxx - lavu 53.05.0 - frame.h
|
||||
Add av_frame_copy() for copying the frame data.
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.2-rc2
|
||||
PROJECT_NUMBER = 2.2
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
||||
+2
-1
@@ -51,8 +51,9 @@ The toolchain provided with Xcode is sufficient to build the basic
|
||||
unacelerated code.
|
||||
|
||||
Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
|
||||
@url{https://github.com/FFmpeg/gas-preprocessor} or
|
||||
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
|
||||
assembler functions. Just download the Perl script and put it somewhere
|
||||
assembler functions. Put the Perl script somewhere
|
||||
in your PATH, FFmpeg's configure will pick it up automatically.
|
||||
|
||||
Mac OS X on amd64 and x86 requires @command{yasm} to build most of the
|
||||
|
||||
+23
-14
@@ -213,7 +213,7 @@ m3u8 files.
|
||||
|
||||
HTTP (Hyper Text Transfer Protocol).
|
||||
|
||||
This protocol accepts the following options.
|
||||
This protocol accepts the following options:
|
||||
|
||||
@table @option
|
||||
@item seekable
|
||||
@@ -223,32 +223,33 @@ if set to -1 it will try to autodetect if it is seekable. Default
|
||||
value is -1.
|
||||
|
||||
@item chunked_post
|
||||
If set to 1 use chunked transfer-encoding for posts, default is 1.
|
||||
If set to 1 use chunked Transfer-Encoding for posts, default is 1.
|
||||
|
||||
@item content_type
|
||||
Set a specific content type for the POST messages.
|
||||
|
||||
@item headers
|
||||
Set custom HTTP headers, can override built in default headers. The
|
||||
value must be a string encoding the headers.
|
||||
|
||||
@item content_type
|
||||
Force a content type.
|
||||
|
||||
@item user-agent
|
||||
Override User-Agent header. If not specified the protocol will use a
|
||||
string describing the libavformat build.
|
||||
|
||||
@item multiple_requests
|
||||
Use persistent connections if set to 1. By default it is 0.
|
||||
Use persistent connections if set to 1, default is 0.
|
||||
|
||||
@item post_data
|
||||
Set custom HTTP post data.
|
||||
|
||||
@item user-agent
|
||||
@item user_agent
|
||||
Override the User-Agent header. If not specified the protocol will use a
|
||||
string describing the libavformat build. ("Lavf/<version>")
|
||||
|
||||
@item timeout
|
||||
Set timeout of socket I/O operations used by the underlying low level
|
||||
operation. By default it is set to -1, which means that the timeout is
|
||||
not specified.
|
||||
|
||||
@item mime_type
|
||||
Set MIME type.
|
||||
Export the MIME type.
|
||||
|
||||
@item icy
|
||||
If set to 1 request ICY (SHOUTcast) metadata from the server. If the server
|
||||
@@ -257,17 +258,25 @@ the @option{icy_metadata_headers} and @option{icy_metadata_packet} options.
|
||||
The default is 0.
|
||||
|
||||
@item icy_metadata_headers
|
||||
If the server supports ICY metadata, this contains the ICY specific HTTP reply
|
||||
headers, separated with newline characters.
|
||||
If the server supports ICY metadata, this contains the ICY-specific HTTP reply
|
||||
headers, separated by newline characters.
|
||||
|
||||
@item icy_metadata_packet
|
||||
If the server supports ICY metadata, and @option{icy} was set to 1, this
|
||||
contains the last non-empty metadata packet sent by the server.
|
||||
contains the last non-empty metadata packet sent by the server. It should be
|
||||
polled in regular intervals by applications interested in mid-stream metadata
|
||||
updates.
|
||||
|
||||
@item cookies
|
||||
Set the cookies to be sent in future requests. The format of each cookie is the
|
||||
same as the value of a Set-Cookie HTTP response field. Multiple cookies can be
|
||||
delimited by a newline character.
|
||||
|
||||
@item offset
|
||||
Set initial byte offset.
|
||||
|
||||
@item end_offset
|
||||
Try to limit the request to bytes preceding this offset.
|
||||
@end table
|
||||
|
||||
@subsection HTTP Cookies
|
||||
|
||||
@@ -323,7 +323,7 @@ sigterm_handler(int sig)
|
||||
received_nb_signals++;
|
||||
term_exit();
|
||||
if(received_nb_signals > 3)
|
||||
exit_program(123);
|
||||
exit(123);
|
||||
}
|
||||
|
||||
void term_init(void)
|
||||
|
||||
+1
-1
@@ -1821,7 +1821,7 @@ static int open_output_file(OptionsContext *o, const char *filename)
|
||||
|
||||
/* subtitles: pick first */
|
||||
MATCH_PER_TYPE_OPT(codec_names, str, subtitle_codec_name, oc, "s");
|
||||
if (!o->subtitle_disable && (oc->oformat->subtitle_codec != AV_CODEC_ID_NONE || subtitle_codec_name)) {
|
||||
if (!o->subtitle_disable && (avcodec_find_encoder(oc->oformat->subtitle_codec) || subtitle_codec_name)) {
|
||||
for (i = 0; i < nb_input_streams; i++)
|
||||
if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
||||
new_subtitle_stream(o, oc, i);
|
||||
|
||||
@@ -26,7 +26,6 @@ OBJS = allcodecs.o \
|
||||
options.o \
|
||||
parser.o \
|
||||
raw.o \
|
||||
rawdec.o \
|
||||
resample.o \
|
||||
resample2.o \
|
||||
utils.o \
|
||||
|
||||
+12
-4
@@ -471,9 +471,11 @@ static void adpcm_swf_decode(AVCodecContext *avctx, const uint8_t *buf, int buf_
|
||||
* @param[out] coded_samples set to the number of samples as coded in the
|
||||
* packet, or 0 if the codec does not encode the
|
||||
* number of samples in each frame.
|
||||
* @param[out] approx_nb_samples set to non-zero if the number of samples
|
||||
* returned is an approximation.
|
||||
*/
|
||||
static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
|
||||
int buf_size, int *coded_samples)
|
||||
int buf_size, int *coded_samples, int *approx_nb_samples)
|
||||
{
|
||||
ADPCMDecodeContext *s = avctx->priv_data;
|
||||
int nb_samples = 0;
|
||||
@@ -482,6 +484,7 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
|
||||
int header_size;
|
||||
|
||||
*coded_samples = 0;
|
||||
*approx_nb_samples = 0;
|
||||
|
||||
if(ch <= 0)
|
||||
return 0;
|
||||
@@ -552,10 +555,12 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
|
||||
case AV_CODEC_ID_ADPCM_EA_R2:
|
||||
header_size = 4 + 5 * ch;
|
||||
*coded_samples = bytestream2_get_le32(gb);
|
||||
*approx_nb_samples = 1;
|
||||
break;
|
||||
case AV_CODEC_ID_ADPCM_EA_R3:
|
||||
header_size = 4 + 5 * ch;
|
||||
*coded_samples = bytestream2_get_be32(gb);
|
||||
*approx_nb_samples = 1;
|
||||
break;
|
||||
}
|
||||
*coded_samples -= *coded_samples % 28;
|
||||
@@ -663,11 +668,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int16_t **samples_p;
|
||||
int st; /* stereo */
|
||||
int count1, count2;
|
||||
int nb_samples, coded_samples, ret;
|
||||
int nb_samples, coded_samples, approx_nb_samples, ret;
|
||||
GetByteContext gb;
|
||||
|
||||
bytestream2_init(&gb, buf, buf_size);
|
||||
nb_samples = get_nb_samples(avctx, &gb, buf_size, &coded_samples);
|
||||
nb_samples = get_nb_samples(avctx, &gb, buf_size, &coded_samples, &approx_nb_samples);
|
||||
if (nb_samples <= 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid number of samples in packet\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
@@ -683,7 +688,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
/* use coded_samples when applicable */
|
||||
/* it is always <= nb_samples, so the output buffer will be large enough */
|
||||
if (coded_samples) {
|
||||
if (coded_samples != nb_samples)
|
||||
if (!approx_nb_samples && coded_samples != nb_samples)
|
||||
av_log(avctx, AV_LOG_WARNING, "mismatch in coded sample count\n");
|
||||
frame->nb_samples = nb_samples = coded_samples;
|
||||
}
|
||||
@@ -917,6 +922,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
*samples++ = c->status[0].predictor + c->status[1].predictor;
|
||||
*samples++ = c->status[0].predictor - c->status[1].predictor;
|
||||
}
|
||||
|
||||
if ((bytestream2_tell(&gb) & 1))
|
||||
bytestream2_skip(&gb, 1);
|
||||
break;
|
||||
}
|
||||
case AV_CODEC_ID_ADPCM_IMA_ISS:
|
||||
|
||||
@@ -1204,7 +1204,7 @@ function ff_put_vp8_\name\size\()_\hv\()_armv6, export=1
|
||||
mov r4, #\size
|
||||
stm r12, {r4, r5}
|
||||
orr r12, r6, r7
|
||||
b vp8_put_\name\()_\hv\()_armv6 + 4
|
||||
b bl_put_\name\()_\hv\()_armv6
|
||||
endfunc
|
||||
.endm
|
||||
|
||||
@@ -1300,6 +1300,7 @@ vp8_mc_hv bilin, 4, h, v, 2
|
||||
|
||||
function vp8_put_epel_h6_armv6
|
||||
push {r1, r4-r11, lr}
|
||||
bl_put_epel_h6_armv6:
|
||||
sub r2, r2, #2
|
||||
movrel lr, sixtap_filters_13245600 - 16
|
||||
add lr, lr, r12, lsl #3
|
||||
@@ -1358,6 +1359,7 @@ endfunc
|
||||
|
||||
function vp8_put_epel_v6_armv6
|
||||
push {r1, r4-r11, lr}
|
||||
bl_put_epel_v6_armv6:
|
||||
movrel lr, sixtap_filters_13245600 - 16
|
||||
add lr, lr, r12, lsl #3
|
||||
str r3, [sp, #48]
|
||||
@@ -1437,6 +1439,7 @@ endfunc
|
||||
|
||||
function vp8_put_epel_h4_armv6
|
||||
push {r1, r4-r11, lr}
|
||||
bl_put_epel_h4_armv6:
|
||||
subs r2, r2, #1
|
||||
movrel lr, fourtap_filters_1324 - 4
|
||||
add lr, lr, r12, lsl #2
|
||||
@@ -1483,6 +1486,7 @@ endfunc
|
||||
|
||||
function vp8_put_epel_v4_armv6
|
||||
push {r1, r4-r11, lr}
|
||||
bl_put_epel_v4_armv6:
|
||||
movrel lr, fourtap_filters_1324 - 4
|
||||
add lr, lr, r12, lsl #2
|
||||
ldm lr, {r5, r6}
|
||||
@@ -1544,6 +1548,7 @@ endfunc
|
||||
|
||||
function vp8_put_bilin_h_armv6
|
||||
push {r1, r4-r11, lr}
|
||||
bl_put_bilin_h_armv6:
|
||||
rsb r5, r12, r12, lsl #16
|
||||
ldr r12, [sp, #44]
|
||||
sub r3, r3, r4
|
||||
@@ -1589,6 +1594,7 @@ endfunc
|
||||
|
||||
function vp8_put_bilin_v_armv6
|
||||
push {r1, r4-r11, lr}
|
||||
bl_put_bilin_v_armv6:
|
||||
rsb r5, r12, r12, lsl #16
|
||||
ldr r12, [sp, #44]
|
||||
add r5, r5, #8
|
||||
|
||||
+9
-4
@@ -691,6 +691,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
switch (chunk_type) {
|
||||
case DISPLAY_INFO:
|
||||
got_header =
|
||||
c->got_header = 0;
|
||||
if (chunk_size < 21) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid display info size %d\n",
|
||||
@@ -717,7 +718,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Unknown compression method %d\n",
|
||||
c->compression);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
ret = AVERROR_PATCHWELCOME;
|
||||
goto header_fail;
|
||||
}
|
||||
c->tile_width = bytestream2_get_be32(&bc);
|
||||
c->tile_height = bytestream2_get_be32(&bc);
|
||||
@@ -737,7 +739,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
|
||||
(chunk_size - 21) < 16 ) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Display info: missing bitmasks!\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto header_fail;
|
||||
}
|
||||
r_mask = bytestream2_get_be32(&bc);
|
||||
g_mask = bytestream2_get_be32(&bc);
|
||||
@@ -746,11 +749,13 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Invalid or unsupported bitmasks: R=%X, G=%X, B=%X\n",
|
||||
r_mask, g_mask, b_mask);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
ret = AVERROR_PATCHWELCOME;
|
||||
goto header_fail;
|
||||
}
|
||||
} else {
|
||||
avpriv_request_sample(avctx, "bpp=%d", c->bpp);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
ret = AVERROR_PATCHWELCOME;
|
||||
goto header_fail;
|
||||
}
|
||||
if (g2m_init_buffers(c)) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
|
||||
+12
-1
@@ -3444,6 +3444,17 @@ int ff_set_ref_count(H264Context *h)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static enum AVPixelFormat non_j_pixfmt(enum AVPixelFormat a)
|
||||
{
|
||||
switch (a) {
|
||||
case AV_PIX_FMT_YUVJ420P: return AV_PIX_FMT_YUV420P;
|
||||
case AV_PIX_FMT_YUVJ422P: return AV_PIX_FMT_YUV422P;
|
||||
case AV_PIX_FMT_YUVJ444P: return AV_PIX_FMT_YUV444P;
|
||||
default:
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode a slice header.
|
||||
* This will (re)intialize the decoder and call h264_frame_start() as needed.
|
||||
@@ -3573,7 +3584,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
|| h->mb_width != h->sps.mb_width
|
||||
|| h->mb_height != h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag)
|
||||
));
|
||||
if (h0->avctx->pix_fmt != get_pixel_format(h0, 0))
|
||||
if (non_j_pixfmt(h0->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h0, 0)))
|
||||
must_reinit = 1;
|
||||
|
||||
h->mb_width = h->sps.mb_width;
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
|
||||
#define FF_SANE_NB_CHANNELS 63U
|
||||
|
||||
#if HAVE_NEON || ARCH_PPC || HAVE_MMX
|
||||
# define STRIDE_ALIGN 16
|
||||
#else
|
||||
# define STRIDE_ALIGN 8
|
||||
#endif
|
||||
|
||||
typedef struct FramePool {
|
||||
/**
|
||||
* Pools for each data plane. For audio all the planes have the same size,
|
||||
|
||||
+22
-3
@@ -83,6 +83,17 @@ static void build_basic_mjpeg_vlc(MJpegDecodeContext *s)
|
||||
avpriv_mjpeg_val_ac_chrominance, 251, 0, 0);
|
||||
}
|
||||
|
||||
static void parse_avid(MJpegDecodeContext *s, uint8_t *buf, int len)
|
||||
{
|
||||
s->buggy_avid = 1;
|
||||
if (len > 14 && buf[12] == 1) /* 1 - NTSC */
|
||||
s->interlace_polarity = 1;
|
||||
if (len > 14 && buf[12] == 2) /* 2 - PAL */
|
||||
s->interlace_polarity = 0;
|
||||
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
|
||||
av_log(s->avctx, AV_LOG_INFO, "AVID: len:%d %d\n", len, len > 14 ? buf[12] : -1);
|
||||
}
|
||||
|
||||
av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
MJpegDecodeContext *s = avctx->priv_data;
|
||||
@@ -120,7 +131,17 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
|
||||
if (avctx->field_order == AV_FIELD_BB) { /* quicktime icefloe 019 */
|
||||
s->interlace_polarity = 1; /* bottom field first */
|
||||
av_log(avctx, AV_LOG_DEBUG, "bottom field first\n");
|
||||
} else if (avctx->field_order == AV_FIELD_UNKNOWN) {
|
||||
if (avctx->codec_tag == AV_RL32("MJPG"))
|
||||
s->interlace_polarity = 1;
|
||||
}
|
||||
|
||||
if ( avctx->extradata_size > 8
|
||||
&& AV_RL32(avctx->extradata) == 0x2C
|
||||
&& AV_RL32(avctx->extradata+4) == 0x18) {
|
||||
parse_avid(s, avctx->extradata, avctx->extradata_size);
|
||||
}
|
||||
|
||||
if (avctx->codec->id == AV_CODEC_ID_AMV)
|
||||
s->flipped = 1;
|
||||
|
||||
@@ -1694,9 +1715,7 @@ static int mjpeg_decode_com(MJpegDecodeContext *s)
|
||||
|
||||
/* buggy avid, it puts EOI only at every 10th frame */
|
||||
if (!strncmp(cbuf, "AVID", 4)) {
|
||||
s->buggy_avid = 1;
|
||||
if (len > 14 && cbuf[12] == 1) /* 1 - NTSC, 2 - PAL */
|
||||
s->interlace_polarity = 1;
|
||||
parse_avid(s, cbuf, len);
|
||||
} else if (!strcmp(cbuf, "CS=ITU601"))
|
||||
s->cs_itu601 = 1;
|
||||
else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32)) ||
|
||||
|
||||
@@ -99,6 +99,7 @@ struct MpegEncContext;
|
||||
*/
|
||||
typedef struct Picture{
|
||||
struct AVFrame f;
|
||||
uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
|
||||
ThreadFrame tf;
|
||||
|
||||
AVBufferRef *qscale_table_buf;
|
||||
@@ -195,8 +196,8 @@ typedef struct Picture{
|
||||
int mbaff; ///< h264 1 -> MBAFF frame 0-> not MBAFF
|
||||
int field_picture; ///< whether or not the picture was encoded in separate fields
|
||||
|
||||
int mb_var_sum; ///< sum of MB variance for current frame
|
||||
int mc_mb_var_sum; ///< motion compensated MB variance for current frame
|
||||
int64_t mb_var_sum; ///< sum of MB variance for current frame
|
||||
int64_t mc_mb_var_sum; ///< motion compensated MB variance for current frame
|
||||
|
||||
int b_frame_score;
|
||||
int needs_realloc; ///< Picture needs to be reallocated (eg due to a frame size change)
|
||||
@@ -251,8 +252,8 @@ typedef struct MotionEstContext{
|
||||
int stride;
|
||||
int uvstride;
|
||||
/* temp variables for picture complexity calculation */
|
||||
int mc_mb_var_sum_temp;
|
||||
int mb_var_sum_temp;
|
||||
int64_t mc_mb_var_sum_temp;
|
||||
int64_t mb_var_sum_temp;
|
||||
int scene_change_score;
|
||||
/* cmp, chroma_cmp;*/
|
||||
op_pixels_func (*hpel_put)[4];
|
||||
|
||||
@@ -1039,6 +1039,10 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
|
||||
direct = 0;
|
||||
if ((s->width & 15) || (s->height & 15))
|
||||
direct = 0;
|
||||
if (((intptr_t)(pic_arg->data[0])) & (STRIDE_ALIGN-1))
|
||||
direct = 0;
|
||||
if (s->linesize & (STRIDE_ALIGN-1))
|
||||
direct = 0;
|
||||
|
||||
av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0],
|
||||
pic_arg->linesize[1], s->linesize, s->uvlinesize);
|
||||
@@ -3439,7 +3443,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
|
||||
s->mb_type[i]= CANDIDATE_MB_TYPE_INTRA;
|
||||
if(s->msmpeg4_version >= 3)
|
||||
s->no_rounding=1;
|
||||
av_dlog(s, "Scene change detected, encoding as I Frame %d %d\n",
|
||||
av_dlog(s, "Scene change detected, encoding as I Frame %"PRId64" %"PRId64"\n",
|
||||
s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
|
||||
}
|
||||
|
||||
|
||||
@@ -317,6 +317,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
|
||||
FrameThreadContext *fctx = p->parent;
|
||||
PerThreadContext *prev_thread = fctx->prev_thread;
|
||||
const AVCodec *codec = p->avctx->codec;
|
||||
int ret;
|
||||
|
||||
if (!avpkt->size && !(codec->capabilities & CODEC_CAP_DELAY)) return 0;
|
||||
|
||||
@@ -340,6 +341,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
|
||||
}
|
||||
}
|
||||
|
||||
av_packet_free_side_data(&p->avpkt);
|
||||
av_buffer_unref(&p->avpkt.buf);
|
||||
p->avpkt = *avpkt;
|
||||
if (avpkt->buf)
|
||||
@@ -354,6 +356,8 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
|
||||
memcpy(p->buf, avpkt->data, avpkt->size);
|
||||
memset(p->buf + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
}
|
||||
if ((ret = av_copy_packet_side_data(&p->avpkt, avpkt)) < 0)
|
||||
return ret;
|
||||
|
||||
p->state = STATE_SETTING_UP;
|
||||
pthread_cond_signal(&p->input_cond);
|
||||
@@ -592,6 +596,7 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
|
||||
pthread_cond_destroy(&p->input_cond);
|
||||
pthread_cond_destroy(&p->progress_cond);
|
||||
pthread_cond_destroy(&p->output_cond);
|
||||
av_packet_free_side_data(&p->avpkt);
|
||||
av_buffer_unref(&p->avpkt.buf);
|
||||
av_freep(&p->buf);
|
||||
av_freep(&p->released_buffers);
|
||||
|
||||
@@ -46,7 +46,7 @@ void ff_write_pass1_stats(MpegEncContext *s)
|
||||
{
|
||||
snprintf(s->avctx->stats_out, 256,
|
||||
"in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d "
|
||||
"fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d;\n",
|
||||
"fcode:%d bcode:%d mc-var:%"PRId64" var:%"PRId64" icount:%d skipcount:%d hbits:%d;\n",
|
||||
s->current_picture_ptr->f.display_picture_number,
|
||||
s->current_picture_ptr->f.coded_picture_number,
|
||||
s->pict_type,
|
||||
@@ -206,7 +206,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
|
||||
assert(picture_number < rcc->num_entries);
|
||||
rce = &rcc->entry[picture_number];
|
||||
|
||||
e += sscanf(p, " in:%*d out:%*d type:%d q:%f itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d",
|
||||
e += sscanf(p, " in:%*d out:%*d type:%d q:%f itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%"SCNd64" var:%"SCNd64" icount:%d skipcount:%d hbits:%d",
|
||||
&rce->pict_type, &rce->qscale, &rce->i_tex_bits, &rce->p_tex_bits,
|
||||
&rce->mv_bits, &rce->misc_bits,
|
||||
&rce->f_code, &rce->b_code,
|
||||
@@ -753,7 +753,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
|
||||
RateControlEntry local_rce, *rce;
|
||||
double bits;
|
||||
double rate_factor;
|
||||
int var;
|
||||
int64_t var;
|
||||
const int pict_type = s->pict_type;
|
||||
Picture * const pic = &s->current_picture;
|
||||
emms_c();
|
||||
@@ -769,8 +769,9 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
|
||||
fps = get_fps(s->avctx);
|
||||
/* update predictors */
|
||||
if (picture_number > 2 && !dry_run) {
|
||||
const int last_var = s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum
|
||||
: rcc->last_mc_mb_var_sum;
|
||||
const int64_t last_var =
|
||||
s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum
|
||||
: rcc->last_mc_mb_var_sum;
|
||||
av_assert1(s->frame_bits >= s->stuffing_bits);
|
||||
update_predictor(&rcc->pred[s->last_pict_type],
|
||||
rcc->last_qscale,
|
||||
@@ -817,7 +818,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
|
||||
assert(pict_type == rce->new_pict_type);
|
||||
|
||||
q = rce->new_qscale / br_compensation;
|
||||
av_dlog(s, "%f %f %f last:%d var:%d type:%d//\n", q, rce->new_qscale,
|
||||
av_dlog(s, "%f %f %f last:%d var:%"PRId64" type:%d//\n", q, rce->new_qscale,
|
||||
br_compensation, s->frame_bits, var, pict_type);
|
||||
} else {
|
||||
rce->pict_type =
|
||||
@@ -879,7 +880,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
|
||||
if (s->avctx->debug & FF_DEBUG_RC) {
|
||||
av_log(s->avctx, AV_LOG_DEBUG,
|
||||
"%c qp:%d<%2.1f<%d %d want:%d total:%d comp:%f st_q:%2.2f "
|
||||
"size:%d var:%d/%d br:%d fps:%d\n",
|
||||
"size:%d var:%"PRId64"/%"PRId64" br:%d fps:%d\n",
|
||||
av_get_picture_type_char(pict_type),
|
||||
qmin, q, qmax, picture_number,
|
||||
(int)wanted_bits / 1000, (int)s->total_bits / 1000,
|
||||
|
||||
@@ -49,8 +49,8 @@ typedef struct RateControlEntry{
|
||||
uint64_t expected_bits;
|
||||
int new_pict_type;
|
||||
float new_qscale;
|
||||
int mc_mb_var_sum;
|
||||
int mb_var_sum;
|
||||
int64_t mc_mb_var_sum;
|
||||
int64_t mb_var_sum;
|
||||
int i_count;
|
||||
int skip_count;
|
||||
int f_code;
|
||||
@@ -71,8 +71,8 @@ typedef struct RateControlContext{
|
||||
double pass1_wanted_bits; ///< bits which should have been outputed by the pass1 code (including complexity init)
|
||||
double last_qscale;
|
||||
double last_qscale_for[5]; ///< last qscale for a specific pict type, used for max_diff & ipb factor stuff
|
||||
int last_mc_mb_var_sum;
|
||||
int last_mb_var_sum;
|
||||
int64_t last_mc_mb_var_sum;
|
||||
int64_t last_mb_var_sum;
|
||||
uint64_t i_cplx_sum[5];
|
||||
uint64_t p_cplx_sum[5];
|
||||
uint64_t mv_bits_sum[5];
|
||||
|
||||
@@ -83,17 +83,6 @@ static const PixelFormatTag pix_fmt_bps_mov[] = {
|
||||
{ AV_PIX_FMT_NONE, 0 },
|
||||
};
|
||||
|
||||
enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags,
|
||||
unsigned int fourcc)
|
||||
{
|
||||
while (tags->pix_fmt >= 0) {
|
||||
if (tags->fourcc == fourcc)
|
||||
return tags->pix_fmt;
|
||||
tags++;
|
||||
}
|
||||
return AV_PIX_FMT_NONE;
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 55
|
||||
enum AVPixelFormat ff_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
|
||||
{
|
||||
|
||||
@@ -1502,8 +1502,8 @@ static int ratecontrol_1pass(SnowContext *s, AVFrame *pict)
|
||||
}
|
||||
|
||||
/* ugly, ratecontrol just takes a sqrt again */
|
||||
coef_sum = (uint64_t)coef_sum * coef_sum >> 16;
|
||||
av_assert0(coef_sum < INT_MAX);
|
||||
coef_sum = (uint64_t)coef_sum * coef_sum >> 16;
|
||||
|
||||
if(pict->pict_type == AV_PICTURE_TYPE_I){
|
||||
s->m.current_picture.mb_var_sum= coef_sum;
|
||||
|
||||
+25
-12
@@ -46,6 +46,7 @@
|
||||
#include "thread.h"
|
||||
#include "frame_thread_encoder.h"
|
||||
#include "internal.h"
|
||||
#include "raw.h"
|
||||
#include "bytestream.h"
|
||||
#include "version.h"
|
||||
#include <stdlib.h>
|
||||
@@ -274,12 +275,6 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if HAVE_NEON || ARCH_PPC || HAVE_MMX
|
||||
# define STRIDE_ALIGN 16
|
||||
#else
|
||||
# define STRIDE_ALIGN 8
|
||||
#endif
|
||||
|
||||
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||
int linesize_align[AV_NUM_DATA_POINTERS])
|
||||
{
|
||||
@@ -813,6 +808,7 @@ int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
|
||||
typedef struct CompatReleaseBufPriv {
|
||||
AVCodecContext avctx;
|
||||
AVFrame frame;
|
||||
uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
|
||||
} CompatReleaseBufPriv;
|
||||
|
||||
static void compat_free_buffer(void *opaque, uint8_t *data)
|
||||
@@ -1076,6 +1072,17 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
|
||||
return 0;
|
||||
}
|
||||
|
||||
enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags,
|
||||
unsigned int fourcc)
|
||||
{
|
||||
while (tags->pix_fmt >= 0) {
|
||||
if (tags->fourcc == fourcc)
|
||||
return tags->pix_fmt;
|
||||
tags++;
|
||||
}
|
||||
return AV_PIX_FMT_NONE;
|
||||
}
|
||||
|
||||
static int is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt)
|
||||
{
|
||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
|
||||
@@ -1621,7 +1628,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
|
||||
const AVFrame *frame,
|
||||
int *got_packet_ptr)
|
||||
{
|
||||
AVFrame tmp;
|
||||
AVFrame *extended_frame = NULL;
|
||||
AVFrame *padded_frame = NULL;
|
||||
int ret;
|
||||
AVPacket user_pkt = *avpkt;
|
||||
@@ -1646,9 +1653,13 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
|
||||
}
|
||||
av_log(avctx, AV_LOG_WARNING, "extended_data is not set.\n");
|
||||
|
||||
tmp = *frame;
|
||||
tmp.extended_data = tmp.data;
|
||||
frame = &tmp;
|
||||
extended_frame = av_frame_alloc();
|
||||
if (!extended_frame)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
memcpy(extended_frame, frame, sizeof(AVFrame));
|
||||
extended_frame->extended_data = extended_frame->data;
|
||||
frame = extended_frame;
|
||||
}
|
||||
|
||||
/* check for valid frame size */
|
||||
@@ -1656,14 +1667,15 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
|
||||
if (avctx->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {
|
||||
if (frame->nb_samples > avctx->frame_size) {
|
||||
av_log(avctx, AV_LOG_ERROR, "more samples than frame size (avcodec_encode_audio2)\n");
|
||||
return AVERROR(EINVAL);
|
||||
ret = AVERROR(EINVAL);
|
||||
goto end;
|
||||
}
|
||||
} else if (!(avctx->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)) {
|
||||
if (frame->nb_samples < avctx->frame_size &&
|
||||
!avctx->internal->last_audio_frame) {
|
||||
ret = pad_last_frame(avctx, &padded_frame, frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto end;
|
||||
|
||||
frame = padded_frame;
|
||||
avctx->internal->last_audio_frame = 1;
|
||||
@@ -1735,6 +1747,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
|
||||
|
||||
end:
|
||||
av_frame_free(&padded_frame);
|
||||
av_free(extended_frame);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ static int iec61883_callback(unsigned char *data, int length,
|
||||
DVPacket *packet;
|
||||
int ret;
|
||||
|
||||
#ifdef THREADS
|
||||
#if THREADS
|
||||
pthread_mutex_lock(&dv->mutex);
|
||||
#endif
|
||||
|
||||
@@ -139,7 +139,7 @@ static int iec61883_callback(unsigned char *data, int length,
|
||||
ret = 0;
|
||||
|
||||
exit:
|
||||
#ifdef THREADS
|
||||
#if THREADS
|
||||
pthread_cond_broadcast(&dv->cond);
|
||||
pthread_mutex_unlock(&dv->mutex);
|
||||
#endif
|
||||
@@ -151,7 +151,7 @@ static void *iec61883_receive_task(void *opaque)
|
||||
struct iec61883_data *dv = (struct iec61883_data *)opaque;
|
||||
int result;
|
||||
|
||||
#ifdef THREADS
|
||||
#if THREADS
|
||||
while (dv->thread_loop)
|
||||
#endif
|
||||
{
|
||||
@@ -168,7 +168,7 @@ static void *iec61883_receive_task(void *opaque)
|
||||
raw1394_loop_iterate(dv->raw1394);
|
||||
} else if (dv->receiving) {
|
||||
av_log(NULL, AV_LOG_ERROR, "No more input data available\n");
|
||||
#ifdef THREADS
|
||||
#if THREADS
|
||||
pthread_mutex_lock(&dv->mutex);
|
||||
dv->eof = 1;
|
||||
pthread_cond_broadcast(&dv->cond);
|
||||
@@ -413,7 +413,7 @@ static int iec61883_read_packet(AVFormatContext *context, AVPacket *pkt)
|
||||
* Try to parse frames from queue
|
||||
*/
|
||||
|
||||
#ifdef THREADS
|
||||
#if THREADS
|
||||
pthread_mutex_lock(&dv->mutex);
|
||||
while ((size = dv->parse_queue(dv, pkt)) == -1)
|
||||
if (!dv->eof)
|
||||
|
||||
@@ -130,8 +130,15 @@ static int xv_write_header(AVFormatContext *s)
|
||||
xv->image_width = encctx->width;
|
||||
xv->image_height = encctx->height;
|
||||
if (!xv->window_width && !xv->window_height) {
|
||||
AVRational sar = encctx->sample_aspect_ratio;
|
||||
xv->window_width = encctx->width;
|
||||
xv->window_height = encctx->height;
|
||||
if (sar.num) {
|
||||
if (sar.num > sar.den)
|
||||
xv->window_width = av_rescale(xv->window_width, sar.num, sar.den);
|
||||
if (sar.num < sar.den)
|
||||
xv->window_height = av_rescale(xv->window_height, sar.den, sar.num);
|
||||
}
|
||||
}
|
||||
xv->window = XCreateSimpleWindow(xv->display, DefaultRootWindow(xv->display),
|
||||
xv->window_x, xv->window_y,
|
||||
|
||||
@@ -184,7 +184,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
|
||||
s->map[i].out_channel_idx = i;
|
||||
break;
|
||||
case MAP_ONE_STR:
|
||||
if (!get_channel(&mapping, &in_ch, separator)) {
|
||||
if (get_channel(&mapping, &in_ch, separator) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, err);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ OBJS-$(CONFIG_M4V_MUXER) += rawenc.o
|
||||
OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroskadec.o matroska.o \
|
||||
isom.o rmsipr.o
|
||||
OBJS-$(CONFIG_MATROSKA_MUXER) += matroskaenc.o matroska.o \
|
||||
isom.o avc.o \
|
||||
isom.o avc.o hevc.o \
|
||||
flacenc_header.o avlanguage.o wv.o
|
||||
OBJS-$(CONFIG_MD5_MUXER) += md5enc.o
|
||||
OBJS-$(CONFIG_MGSTS_DEMUXER) += mgsts.o
|
||||
|
||||
@@ -988,6 +988,13 @@ typedef struct AVStream {
|
||||
int64_t pts_reorder_error[MAX_REORDER_DELAY+1];
|
||||
uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1];
|
||||
|
||||
/**
|
||||
* Internal data to analyze DTS and detect faulty mpeg streams
|
||||
*/
|
||||
int64_t last_dts_for_order_check;
|
||||
uint8_t dts_ordered;
|
||||
uint8_t dts_misordered;
|
||||
|
||||
} AVStream;
|
||||
|
||||
AVRational av_stream_get_r_frame_rate(const AVStream *s);
|
||||
|
||||
+16
-3
@@ -201,12 +201,14 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
|
||||
int64_t offset1;
|
||||
int64_t pos;
|
||||
int force = whence & AVSEEK_FORCE;
|
||||
int buffer_size;
|
||||
whence &= ~AVSEEK_FORCE;
|
||||
|
||||
if(!s)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
pos = s->pos - (s->write_flag ? 0 : (s->buf_end - s->buffer));
|
||||
buffer_size = s->buf_end - s->buffer;
|
||||
pos = s->pos - (s->write_flag ? 0 : buffer_size);
|
||||
|
||||
if (whence != SEEK_CUR && whence != SEEK_SET)
|
||||
return AVERROR(EINVAL);
|
||||
@@ -219,7 +221,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
|
||||
}
|
||||
offset1 = offset - pos;
|
||||
if (!s->must_flush && (!s->direct || !s->seek) &&
|
||||
offset1 >= 0 && offset1 <= (s->buf_end - s->buffer)) {
|
||||
offset1 >= 0 && offset1 <= buffer_size) {
|
||||
/* can do the seek inside the buffer */
|
||||
s->buf_ptr = s->buffer + offset1;
|
||||
} else if ((!s->seekable ||
|
||||
@@ -232,9 +234,20 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
|
||||
if (s->eof_reached)
|
||||
return AVERROR_EOF;
|
||||
s->buf_ptr = s->buf_end + offset - s->pos;
|
||||
} else {
|
||||
} else if(!s->write_flag && offset1 < 0 && -offset1 < buffer_size>>1 && s->seek && offset > 0) {
|
||||
int64_t res;
|
||||
|
||||
pos -= FFMIN(buffer_size>>1, pos);
|
||||
if ((res = s->seek(s->opaque, pos, SEEK_SET)) < 0)
|
||||
return res;
|
||||
s->buf_end =
|
||||
s->buf_ptr = s->buffer;
|
||||
s->pos = pos;
|
||||
s->eof_reached = 0;
|
||||
fill_buffer(s);
|
||||
return avio_seek(s, offset, SEEK_SET | force);
|
||||
} else {
|
||||
int64_t res;
|
||||
if (s->write_flag) {
|
||||
flush_buffer(s);
|
||||
s->must_flush = 1;
|
||||
|
||||
+225
-121
@@ -49,29 +49,37 @@ typedef struct {
|
||||
unsigned char buffer[BUFFER_SIZE], *buf_ptr, *buf_end;
|
||||
int line_count;
|
||||
int http_code;
|
||||
int64_t chunksize; /**< Used if "Transfer-Encoding: chunked" otherwise -1. */
|
||||
char *content_type;
|
||||
char *user_agent;
|
||||
int64_t off, filesize, req_end_offset;
|
||||
int icy_data_read; ///< how much data was read since last ICY metadata packet
|
||||
int icy_metaint; ///< after how many bytes of read data a new metadata packet will be found
|
||||
/* Used if "Transfer-Encoding: chunked" otherwise -1. */
|
||||
int64_t chunksize;
|
||||
int64_t off, end_off, filesize;
|
||||
char *location;
|
||||
HTTPAuthState auth_state;
|
||||
HTTPAuthState proxy_auth_state;
|
||||
char *headers;
|
||||
int willclose; /**< Set if the server correctly handles Connection: close and will close the connection after feeding us the content. */
|
||||
char *mime_type;
|
||||
char *user_agent;
|
||||
char *content_type;
|
||||
/* Set if the server correctly handles Connection: close and will close
|
||||
* the connection after feeding us the content. */
|
||||
int willclose;
|
||||
int seekable; /**< Control seekability, 0 = disable, 1 = enable, -1 = probe. */
|
||||
int chunked_post;
|
||||
int end_chunked_post; /**< A flag which indicates if the end of chunked encoding has been sent. */
|
||||
int end_header; /**< A flag which indicates we have finished to read POST reply. */
|
||||
int multiple_requests; /**< A flag which indicates if we use persistent connections. */
|
||||
/* A flag which indicates if the end of chunked encoding has been sent. */
|
||||
int end_chunked_post;
|
||||
/* A flag which indicates we have finished to read POST reply. */
|
||||
int end_header;
|
||||
/* A flag which indicates if we use persistent connections. */
|
||||
int multiple_requests;
|
||||
uint8_t *post_data;
|
||||
int post_datalen;
|
||||
int is_akamai;
|
||||
int is_mediagateway;
|
||||
char *mime_type;
|
||||
char *cookies; ///< holds newline (\n) delimited Set-Cookie header field values (without the "Set-Cookie: " field name)
|
||||
int icy;
|
||||
/* how much data was read since the last ICY metadata packet */
|
||||
int icy_data_read;
|
||||
/* after how many bytes of read data a new metadata packet will be found */
|
||||
int icy_metaint;
|
||||
char *icy_metadata_headers;
|
||||
char *icy_metadata_packet;
|
||||
#if CONFIG_ZLIB
|
||||
@@ -91,22 +99,23 @@ static const AVOption options[] = {
|
||||
{"seekable", "control seekability of connection", OFFSET(seekable), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, D },
|
||||
{"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E },
|
||||
{"headers", "set custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
|
||||
{"content_type", "force a content type", OFFSET(content_type), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
|
||||
{"content_type", "set a specific content type for the POST messages", OFFSET(content_type), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
|
||||
{"user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D },
|
||||
{"user-agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D },
|
||||
{"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E },
|
||||
{"post_data", "set custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E },
|
||||
{"mime_type", "set MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 },
|
||||
{"mime_type", "export the MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, {0}, 0, 0, AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY },
|
||||
{"cookies", "set cookies to be sent in applicable future requests, use newline delimited Set-Cookie HTTP field value syntax", OFFSET(cookies), AV_OPT_TYPE_STRING, {0}, 0, 0, D },
|
||||
{"icy", "request ICY metadata", OFFSET(icy), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D },
|
||||
{"icy_metadata_headers", "return ICY metadata headers", OFFSET(icy_metadata_headers), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 },
|
||||
{"icy_metadata_packet", "return current ICY metadata packet", OFFSET(icy_metadata_packet), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 },
|
||||
{"icy_metadata_headers", "return ICY metadata headers", OFFSET(icy_metadata_headers), AV_OPT_TYPE_STRING, {0}, 0, 0, AV_OPT_FLAG_EXPORT },
|
||||
{"icy_metadata_packet", "return current ICY metadata packet", OFFSET(icy_metadata_packet), AV_OPT_TYPE_STRING, {0}, 0, 0, AV_OPT_FLAG_EXPORT },
|
||||
{"auth_type", "HTTP authentication type", OFFSET(auth_state.auth_type), AV_OPT_TYPE_INT, {.i64 = HTTP_AUTH_NONE}, HTTP_AUTH_NONE, HTTP_AUTH_BASIC, D|E, "auth_type" },
|
||||
{"none", "No auth method set, autodetect", 0, AV_OPT_TYPE_CONST, {.i64 = HTTP_AUTH_NONE}, 0, 0, D|E, "auth_type" },
|
||||
{"basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, {.i64 = HTTP_AUTH_BASIC}, 0, 0, D|E, "auth_type" },
|
||||
{"send_expect_100", "Force sending an Expect: 100-continue header for POST", OFFSET(send_expect_100), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, E },
|
||||
{"location", "The actual location of the data received", OFFSET(location), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
|
||||
{"offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D },
|
||||
{"end_offset", "try to limit the request to bytes preceding this offset", OFFSET(req_end_offset), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D },
|
||||
{"end_offset", "try to limit the request to bytes preceding this offset", OFFSET(end_off), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D },
|
||||
{NULL}
|
||||
};
|
||||
#define HTTP_CLASS(flavor)\
|
||||
@@ -287,7 +296,7 @@ static int http_getc(HTTPContext *s)
|
||||
if (len < 0) {
|
||||
return len;
|
||||
} else if (len == 0) {
|
||||
return -1;
|
||||
return AVERROR_EOF;
|
||||
} else {
|
||||
s->buf_ptr = s->buffer;
|
||||
s->buf_end = s->buffer + len;
|
||||
@@ -320,11 +329,110 @@ static int http_get_line(HTTPContext *s, char *line, int line_size)
|
||||
}
|
||||
}
|
||||
|
||||
static int check_http_code(URLContext *h, int http_code, const char *end)
|
||||
{
|
||||
HTTPContext *s = h->priv_data;
|
||||
/* error codes are 4xx and 5xx, but regard 401 as a success, so we
|
||||
* don't abort until all headers have been parsed. */
|
||||
if (http_code >= 400 && http_code < 600 &&
|
||||
(http_code != 401 || s->auth_state.auth_type != HTTP_AUTH_NONE) &&
|
||||
(http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) {
|
||||
end += strspn(end, SPACE_CHARS);
|
||||
av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", http_code, end);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int parse_location(HTTPContext *s, const char *p)
|
||||
{
|
||||
char redirected_location[MAX_URL_SIZE], *new_loc;
|
||||
ff_make_absolute_url(redirected_location, sizeof(redirected_location),
|
||||
s->location, p);
|
||||
new_loc = av_strdup(redirected_location);
|
||||
if (!new_loc)
|
||||
return AVERROR(ENOMEM);
|
||||
av_free(s->location);
|
||||
s->location = new_loc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* "bytes $from-$to/$document_size" */
|
||||
static void parse_content_range(URLContext *h, const char *p)
|
||||
{
|
||||
HTTPContext *s = h->priv_data;
|
||||
const char *slash;
|
||||
|
||||
if (!strncmp(p, "bytes ", 6)) {
|
||||
p += 6;
|
||||
s->off = strtoll(p, NULL, 10);
|
||||
if ((slash = strchr(p, '/')) && strlen(slash) > 0)
|
||||
s->filesize = strtoll(slash+1, NULL, 10);
|
||||
}
|
||||
if (s->seekable == -1 && (!s->is_akamai || s->filesize != 2147483647))
|
||||
h->is_streamed = 0; /* we _can_ in fact seek */
|
||||
}
|
||||
|
||||
static int parse_content_encoding(URLContext *h, const char *p)
|
||||
{
|
||||
HTTPContext *s = h->priv_data;
|
||||
|
||||
if (!av_strncasecmp(p, "gzip", 4) ||
|
||||
!av_strncasecmp(p, "deflate", 7)) {
|
||||
#if CONFIG_ZLIB
|
||||
s->compressed = 1;
|
||||
inflateEnd(&s->inflate_stream);
|
||||
if (inflateInit2(&s->inflate_stream, 32 + 15) != Z_OK) {
|
||||
av_log(h, AV_LOG_WARNING, "Error during zlib initialisation: %s\n",
|
||||
s->inflate_stream.msg);
|
||||
return AVERROR(ENOSYS);
|
||||
}
|
||||
if (zlibCompileFlags() & (1 << 17)) {
|
||||
av_log(h, AV_LOG_WARNING,
|
||||
"Your zlib was compiled without gzip support.\n");
|
||||
return AVERROR(ENOSYS);
|
||||
}
|
||||
#else
|
||||
av_log(h, AV_LOG_WARNING,
|
||||
"Compressed (%s) content, need zlib with gzip support\n", p);
|
||||
return AVERROR(ENOSYS);
|
||||
#endif
|
||||
} else if (!av_strncasecmp(p, "identity", 8)) {
|
||||
// The normal, no-encoding case (although servers shouldn't include
|
||||
// the header at all if this is the case).
|
||||
} else {
|
||||
av_log(h, AV_LOG_WARNING, "Unknown content coding: %s\n", p);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Concat all Icy- header lines
|
||||
static int parse_icy(HTTPContext *s, const char *tag, const char *p)
|
||||
{
|
||||
int len = 4 + strlen(p) + strlen(tag);
|
||||
int is_first = !s->icy_metadata_headers;
|
||||
int ret;
|
||||
|
||||
if (s->icy_metadata_headers)
|
||||
len += strlen(s->icy_metadata_headers);
|
||||
|
||||
if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)
|
||||
return ret;
|
||||
|
||||
if (is_first)
|
||||
*s->icy_metadata_headers = '\0';
|
||||
|
||||
av_strlcatf(s->icy_metadata_headers, len, "%s: %s\n", tag, p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int process_line(URLContext *h, char *line, int line_count,
|
||||
int *new_location)
|
||||
{
|
||||
HTTPContext *s = h->priv_data;
|
||||
char *tag, *p, *end;
|
||||
int ret;
|
||||
|
||||
/* end of header */
|
||||
if (line[0] == '\0') {
|
||||
@@ -342,16 +450,8 @@ static int process_line(URLContext *h, char *line, int line_count,
|
||||
|
||||
av_log(h, AV_LOG_DEBUG, "http_code=%d\n", s->http_code);
|
||||
|
||||
/* error codes are 4xx and 5xx, but regard 401 as a success, so we
|
||||
* don't abort until all headers have been parsed. */
|
||||
if (s->http_code >= 400 && s->http_code < 600 && (s->http_code != 401
|
||||
|| s->auth_state.auth_type != HTTP_AUTH_NONE) &&
|
||||
(s->http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) {
|
||||
end += strspn(end, SPACE_CHARS);
|
||||
av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n",
|
||||
s->http_code, end);
|
||||
return -1;
|
||||
}
|
||||
if ((ret = check_http_code(h, s->http_code, end)) < 0)
|
||||
return ret;
|
||||
} else {
|
||||
while (*p != '\0' && *p != ':')
|
||||
p++;
|
||||
@@ -364,40 +464,28 @@ static int process_line(URLContext *h, char *line, int line_count,
|
||||
while (av_isspace(*p))
|
||||
p++;
|
||||
if (!av_strcasecmp(tag, "Location")) {
|
||||
char redirected_location[MAX_URL_SIZE], *new_loc;
|
||||
ff_make_absolute_url(redirected_location, sizeof(redirected_location),
|
||||
s->location, p);
|
||||
new_loc = av_strdup(redirected_location);
|
||||
if (!new_loc)
|
||||
return AVERROR(ENOMEM);
|
||||
av_free(s->location);
|
||||
s->location = new_loc;
|
||||
if ((ret = parse_location(s, p)) < 0)
|
||||
return ret;
|
||||
*new_location = 1;
|
||||
} else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) {
|
||||
} else if (!av_strcasecmp(tag, "Content-Length") && s->filesize == -1) {
|
||||
s->filesize = strtoll(p, NULL, 10);
|
||||
} else if (!av_strcasecmp (tag, "Content-Range")) {
|
||||
/* "bytes $from-$to/$document_size" */
|
||||
const char *slash;
|
||||
if (!strncmp (p, "bytes ", 6)) {
|
||||
p += 6;
|
||||
s->off = strtoll(p, NULL, 10);
|
||||
if ((slash = strchr(p, '/')) && strlen(slash) > 0)
|
||||
s->filesize = strtoll(slash+1, NULL, 10);
|
||||
}
|
||||
if (s->seekable == -1 && (!s->is_akamai || s->filesize != 2147483647))
|
||||
h->is_streamed = 0; /* we _can_ in fact seek */
|
||||
} else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5) && s->seekable == -1) {
|
||||
} else if (!av_strcasecmp(tag, "Content-Range")) {
|
||||
parse_content_range(h, p);
|
||||
} else if (!av_strcasecmp(tag, "Accept-Ranges") &&
|
||||
!strncmp(p, "bytes", 5) &&
|
||||
s->seekable == -1) {
|
||||
h->is_streamed = 0;
|
||||
} else if (!av_strcasecmp (tag, "Transfer-Encoding") && !av_strncasecmp(p, "chunked", 7)) {
|
||||
} else if (!av_strcasecmp(tag, "Transfer-Encoding") &&
|
||||
!av_strncasecmp(p, "chunked", 7)) {
|
||||
s->filesize = -1;
|
||||
s->chunksize = 0;
|
||||
} else if (!av_strcasecmp (tag, "WWW-Authenticate")) {
|
||||
} else if (!av_strcasecmp(tag, "WWW-Authenticate")) {
|
||||
ff_http_auth_handle_header(&s->auth_state, tag, p);
|
||||
} else if (!av_strcasecmp (tag, "Authentication-Info")) {
|
||||
} else if (!av_strcasecmp(tag, "Authentication-Info")) {
|
||||
ff_http_auth_handle_header(&s->auth_state, tag, p);
|
||||
} else if (!av_strcasecmp (tag, "Proxy-Authenticate")) {
|
||||
} else if (!av_strcasecmp(tag, "Proxy-Authenticate")) {
|
||||
ff_http_auth_handle_header(&s->proxy_auth_state, tag, p);
|
||||
} else if (!av_strcasecmp (tag, "Connection")) {
|
||||
} else if (!av_strcasecmp(tag, "Connection")) {
|
||||
if (!strcmp(p, "close"))
|
||||
s->willclose = 1;
|
||||
} else if (!av_strcasecmp (tag, "Server")) {
|
||||
@@ -407,7 +495,8 @@ static int process_line(URLContext *h, char *line, int line_count,
|
||||
s->is_mediagateway = 1;
|
||||
}
|
||||
} else if (!av_strcasecmp (tag, "Content-Type")) {
|
||||
av_free(s->mime_type); s->mime_type = av_strdup(p);
|
||||
av_free(s->mime_type);
|
||||
s->mime_type = av_strdup(p);
|
||||
} else if (!av_strcasecmp (tag, "Set-Cookie")) {
|
||||
if (!s->cookies) {
|
||||
if (!(s->cookies = av_strdup(p)))
|
||||
@@ -425,37 +514,11 @@ static int process_line(URLContext *h, char *line, int line_count,
|
||||
} else if (!av_strcasecmp (tag, "Icy-MetaInt")) {
|
||||
s->icy_metaint = strtoll(p, NULL, 10);
|
||||
} else if (!av_strncasecmp(tag, "Icy-", 4)) {
|
||||
// Concat all Icy- header lines
|
||||
char *buf = av_asprintf("%s%s: %s\n",
|
||||
s->icy_metadata_headers ? s->icy_metadata_headers : "", tag, p);
|
||||
if (!buf)
|
||||
return AVERROR(ENOMEM);
|
||||
av_freep(&s->icy_metadata_headers);
|
||||
s->icy_metadata_headers = buf;
|
||||
} else if (!av_strcasecmp (tag, "Content-Encoding")) {
|
||||
if (!av_strncasecmp(p, "gzip", 4) || !av_strncasecmp(p, "deflate", 7)) {
|
||||
#if CONFIG_ZLIB
|
||||
s->compressed = 1;
|
||||
inflateEnd(&s->inflate_stream);
|
||||
if (inflateInit2(&s->inflate_stream, 32 + 15) != Z_OK) {
|
||||
av_log(h, AV_LOG_WARNING, "Error during zlib initialisation: %s\n",
|
||||
s->inflate_stream.msg);
|
||||
return AVERROR(ENOSYS);
|
||||
}
|
||||
if (zlibCompileFlags() & (1 << 17)) {
|
||||
av_log(h, AV_LOG_WARNING, "Your zlib was compiled without gzip support.\n");
|
||||
return AVERROR(ENOSYS);
|
||||
}
|
||||
#else
|
||||
av_log(h, AV_LOG_WARNING, "Compressed (%s) content, need zlib with gzip support\n", p);
|
||||
return AVERROR(ENOSYS);
|
||||
#endif
|
||||
} else if (!av_strncasecmp(p, "identity", 8)) {
|
||||
// The normal, no-encoding case (although servers shouldn't include
|
||||
// the header at all if this is the case).
|
||||
} else {
|
||||
av_log(h, AV_LOG_WARNING, "Unknown content coding: %s\n", p);
|
||||
}
|
||||
if ((ret = parse_icy(s, tag, p)) < 0)
|
||||
return ret;
|
||||
} else if (!av_strcasecmp(tag, "Content-Encoding")) {
|
||||
if ((ret = parse_content_encoding(h, p)) < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
@@ -648,12 +711,12 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
|
||||
// Note: we send this on purpose even when s->off is 0 when we're probing,
|
||||
// since it allows us to detect more reliably if a (non-conforming)
|
||||
// server supports seeking by analysing the reply headers.
|
||||
if (!has_header(s->headers, "\r\nRange: ") && !post && (s->off > 0 || s->req_end_offset || s->seekable == -1)) {
|
||||
if (!has_header(s->headers, "\r\nRange: ") && !post && (s->off > 0 || s->end_off || s->seekable == -1)) {
|
||||
len += av_strlcatf(headers + len, sizeof(headers) - len,
|
||||
"Range: bytes=%"PRId64"-", s->off);
|
||||
if (s->req_end_offset)
|
||||
if (s->end_off)
|
||||
len += av_strlcatf(headers + len, sizeof(headers) - len,
|
||||
"%"PRId64, s->req_end_offset - 1);
|
||||
"%"PRId64, s->end_off - 1);
|
||||
len += av_strlcpy(headers + len, "\r\n",
|
||||
sizeof(headers) - len);
|
||||
}
|
||||
@@ -677,6 +740,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
|
||||
if (!has_header(s->headers, "\r\nContent-Length: ") && s->post_data)
|
||||
len += av_strlcatf(headers + len, sizeof(headers) - len,
|
||||
"Content-Length: %d\r\n", s->post_datalen);
|
||||
|
||||
if (!has_header(s->headers, "\r\nContent-Type: ") && s->content_type)
|
||||
len += av_strlcatf(headers + len, sizeof(headers) - len,
|
||||
"Content-Type: %s\r\n", s->content_type);
|
||||
@@ -768,7 +832,6 @@ static int http_buf_read(URLContext *h, uint8_t *buf, int size)
|
||||
}
|
||||
if (len > 0) {
|
||||
s->off += len;
|
||||
s->icy_data_read += len;
|
||||
if (s->chunksize > 0)
|
||||
s->chunksize -= len;
|
||||
}
|
||||
@@ -807,7 +870,7 @@ static int http_buf_read_compressed(URLContext *h, uint8_t *buf, int size)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int http_read(URLContext *h, uint8_t *buf, int size)
|
||||
static int http_read_stream(URLContext *h, uint8_t *buf, int size)
|
||||
{
|
||||
HTTPContext *s = h->priv_data;
|
||||
int err, new_location;
|
||||
@@ -842,32 +905,6 @@ static int http_read(URLContext *h, uint8_t *buf, int size)
|
||||
}
|
||||
size = FFMIN(size, s->chunksize);
|
||||
}
|
||||
if (s->icy_metaint > 0) {
|
||||
int remaining = s->icy_metaint - s->icy_data_read; /* until next metadata packet */
|
||||
if (!remaining) {
|
||||
// The metadata packet is variable sized. It has a 1 byte header
|
||||
// which sets the length of the packet (divided by 16). If it's 0,
|
||||
// the metadata doesn't change. After the packet, icy_metaint bytes
|
||||
// of normal data follow.
|
||||
int ch = http_getc(s);
|
||||
if (ch < 0)
|
||||
return ch;
|
||||
if (ch > 0) {
|
||||
char data[255 * 16 + 1];
|
||||
int n;
|
||||
int ret;
|
||||
ch *= 16;
|
||||
for (n = 0; n < ch; n++)
|
||||
data[n] = http_getc(s);
|
||||
data[ch + 1] = 0;
|
||||
if ((ret = av_opt_set(s, "icy_metadata_packet", data, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
s->icy_data_read = 0;
|
||||
remaining = s->icy_metaint;
|
||||
}
|
||||
size = FFMIN(size, remaining);
|
||||
}
|
||||
#if CONFIG_ZLIB
|
||||
if (s->compressed)
|
||||
return http_buf_read_compressed(h, buf, size);
|
||||
@@ -875,6 +912,72 @@ static int http_read(URLContext *h, uint8_t *buf, int size)
|
||||
return http_buf_read(h, buf, size);
|
||||
}
|
||||
|
||||
// Like http_read_stream(), but no short reads.
|
||||
// Assumes partial reads are an error.
|
||||
static int http_read_stream_all(URLContext *h, uint8_t *buf, int size)
|
||||
{
|
||||
int pos = 0;
|
||||
while (pos < size) {
|
||||
int len = http_read_stream(h, buf + pos, size - pos);
|
||||
if (len < 0)
|
||||
return len;
|
||||
pos += len;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
static int store_icy(URLContext *h, int size)
|
||||
{
|
||||
HTTPContext *s = h->priv_data;
|
||||
/* until next metadata packet */
|
||||
int remaining = s->icy_metaint - s->icy_data_read;
|
||||
|
||||
if (remaining < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (!remaining) {
|
||||
// The metadata packet is variable sized. It has a 1 byte header
|
||||
// which sets the length of the packet (divided by 16). If it's 0,
|
||||
// the metadata doesn't change. After the packet, icy_metaint bytes
|
||||
// of normal data follow.
|
||||
uint8_t ch;
|
||||
int len = http_read_stream_all(h, &ch, 1);
|
||||
if (len < 0)
|
||||
return len;
|
||||
if (ch > 0) {
|
||||
char data[255 * 16 + 1];
|
||||
int ret;
|
||||
len = ch * 16;
|
||||
ret = http_read_stream_all(h, data, len);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
data[len + 1] = 0;
|
||||
if ((ret = av_opt_set(s, "icy_metadata_packet", data, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
s->icy_data_read = 0;
|
||||
remaining = s->icy_metaint;
|
||||
}
|
||||
|
||||
return FFMIN(size, remaining);
|
||||
}
|
||||
|
||||
static int http_read(URLContext *h, uint8_t *buf, int size)
|
||||
{
|
||||
HTTPContext *s = h->priv_data;
|
||||
|
||||
if (s->icy_metaint > 0) {
|
||||
size = store_icy(h, size);
|
||||
if (size < 0)
|
||||
return size;
|
||||
}
|
||||
|
||||
size = http_read_stream(h, buf, size);
|
||||
if (size > 0)
|
||||
s->icy_data_read += size;
|
||||
return size;
|
||||
}
|
||||
|
||||
/* used only when posting data */
|
||||
static int http_write(URLContext *h, const uint8_t *buf, int size)
|
||||
{
|
||||
@@ -945,15 +1048,16 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence)
|
||||
URLContext *old_hd = s->hd;
|
||||
int64_t old_off = s->off;
|
||||
uint8_t old_buf[BUFFER_SIZE];
|
||||
int old_buf_size;
|
||||
int old_buf_size, ret;
|
||||
AVDictionary *options = NULL;
|
||||
|
||||
if (whence == AVSEEK_SIZE)
|
||||
return s->filesize;
|
||||
else if ((whence == SEEK_CUR && off == 0) || (whence == SEEK_SET && off == s->off))
|
||||
else if ((whence == SEEK_CUR && off == 0) ||
|
||||
(whence == SEEK_SET && off == s->off))
|
||||
return s->off;
|
||||
else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed)
|
||||
return -1;
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
/* we save the old context in case the seek fails */
|
||||
old_buf_size = s->buf_end - s->buf_ptr;
|
||||
@@ -967,14 +1071,14 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence)
|
||||
|
||||
/* if it fails, continue on old connection */
|
||||
av_dict_copy(&options, s->chained_options, 0);
|
||||
if (http_open_cnx(h, &options) < 0) {
|
||||
if ((ret = http_open_cnx(h, &options)) < 0) {
|
||||
av_dict_free(&options);
|
||||
memcpy(s->buffer, old_buf, old_buf_size);
|
||||
s->buf_ptr = s->buffer;
|
||||
s->buf_end = s->buffer + old_buf_size;
|
||||
s->hd = old_hd;
|
||||
s->off = old_off;
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
av_dict_free(&options);
|
||||
ffurl_close(old_hd);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "avc.h"
|
||||
#include "hevc.h"
|
||||
#include "avformat.h"
|
||||
#include "avio_internal.h"
|
||||
#include "avlanguage.h"
|
||||
@@ -532,6 +533,8 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
|
||||
ret = put_wv_codecpriv(dyn_cp, codec);
|
||||
else if (codec->codec_id == AV_CODEC_ID_H264)
|
||||
ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
|
||||
else if (codec->codec_id == AV_CODEC_ID_HEVC)
|
||||
ret = ff_isom_write_hvcc(dyn_cp, codec->extradata, codec->extradata_size, 0);
|
||||
else if (codec->codec_id == AV_CODEC_ID_ALAC) {
|
||||
if (codec->extradata_size < 36) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
@@ -1368,6 +1371,10 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb,
|
||||
if (codec->codec_id == AV_CODEC_ID_H264 && codec->extradata_size > 0 &&
|
||||
(AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1))
|
||||
ff_avc_parse_nal_units_buf(pkt->data, &data, &size);
|
||||
else if (codec->codec_id == AV_CODEC_ID_HEVC && codec->extradata_size > 6 &&
|
||||
(AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1))
|
||||
/* extradata is Annex B, assume the bitstream is too and convert it */
|
||||
ff_hevc_annexb2mp4_buf(pkt->data, &data, &size, 0, NULL);
|
||||
else if (codec->codec_id == AV_CODEC_ID_WAVPACK) {
|
||||
int ret = mkv_strip_wavpack(pkt->data, &data, &size);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -67,6 +67,7 @@ static const AVOption options[] = {
|
||||
{ "ism_lookahead", "Number of lookahead entries for ISM files", offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
|
||||
{ "use_editlist", "use edit list", offsetof(MOVMuxContext, use_editlist), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM},
|
||||
{ "video_track_timescale", "set timescale of all video tracks", offsetof(MOVMuxContext, video_track_timescale), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
|
||||
{ "brand", "Override major brand", offsetof(MOVMuxContext, major_brand), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
@@ -2960,7 +2961,9 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s)
|
||||
avio_wb32(pb, 0); /* size */
|
||||
ffio_wfourcc(pb, "ftyp");
|
||||
|
||||
if (mov->mode == MODE_3GP) {
|
||||
if (mov->major_brand && strlen(mov->major_brand) >= 4)
|
||||
ffio_wfourcc(pb, mov->major_brand);
|
||||
else if (mov->mode == MODE_3GP) {
|
||||
ffio_wfourcc(pb, has_h264 ? "3gp6" : "3gp4");
|
||||
minor = has_h264 ? 0x100 : 0x200;
|
||||
} else if (mov->mode & MODE_3G2) {
|
||||
|
||||
@@ -173,6 +173,8 @@ typedef struct MOVMuxContext {
|
||||
|
||||
int reserved_moov_size; ///< 0 for disabled, -1 for automatic, size otherwise
|
||||
int64_t reserved_moov_pos;
|
||||
|
||||
char *major_brand;
|
||||
} MOVMuxContext;
|
||||
|
||||
#define FF_MOV_FLAG_RTP_HINT 1
|
||||
|
||||
@@ -318,6 +318,8 @@ static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (dir < 0)
|
||||
avio_seek(s->pb, FFMAX(ie->pos - 4096, 0), SEEK_SET);
|
||||
ret = avio_seek(s->pb, ie->pos, SEEK_SET);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -417,14 +417,14 @@ static int mp3_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
if (mp3->pics_to_write) {
|
||||
/* buffer audio packets until we get all the pictures */
|
||||
AVPacketList *pktl = av_mallocz(sizeof(*pktl));
|
||||
int ret;
|
||||
if (!pktl)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
pktl->pkt = *pkt;
|
||||
pktl->pkt.buf = av_buffer_ref(pkt->buf);
|
||||
if (!pktl->pkt.buf) {
|
||||
ret = av_copy_packet(&pktl->pkt, pkt);
|
||||
if (ret < 0) {
|
||||
av_freep(&pktl);
|
||||
return AVERROR(ENOMEM);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (mp3->queue_end)
|
||||
|
||||
@@ -996,10 +996,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
|
||||
pes->pts = AV_NOPTS_VALUE;
|
||||
pes->dts = AV_NOPTS_VALUE;
|
||||
if ((flags & 0xc0) == 0x80) {
|
||||
pes->pts = ff_parse_pes_pts(r);
|
||||
/* video pts is not monotonic, can't be used for dts */
|
||||
if (pes->st->codec->codec_type != AVMEDIA_TYPE_VIDEO)
|
||||
pes->dts = pes->pts;
|
||||
pes->dts = pes->pts = ff_parse_pes_pts(r);
|
||||
r += 5;
|
||||
} else if ((flags & 0xc0) == 0xc0) {
|
||||
pes->pts = ff_parse_pes_pts(r);
|
||||
|
||||
@@ -1120,6 +1120,28 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
||||
if (s->flags & AVFMT_FLAG_NOFILLIN)
|
||||
return;
|
||||
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && pkt->dts != AV_NOPTS_VALUE) {
|
||||
if (pkt->dts == pkt->pts && st->last_dts_for_order_check != AV_NOPTS_VALUE) {
|
||||
if (st->last_dts_for_order_check <= pkt->dts) {
|
||||
st->dts_ordered++;
|
||||
} else {
|
||||
av_log(s, st->dts_misordered ? AV_LOG_DEBUG : AV_LOG_WARNING,
|
||||
"DTS %"PRIi64" < %"PRIi64" out of order\n",
|
||||
pkt->dts,
|
||||
st->last_dts_for_order_check);
|
||||
st->dts_misordered++;
|
||||
}
|
||||
if (st->dts_ordered + st->dts_misordered > 250) {
|
||||
st->dts_ordered >>= 1;
|
||||
st->dts_misordered >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
st->last_dts_for_order_check = pkt->dts;
|
||||
if (st->dts_ordered < 8*st->dts_misordered && pkt->dts == pkt->pts)
|
||||
pkt->dts = AV_NOPTS_VALUE;
|
||||
}
|
||||
|
||||
if ((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
|
||||
pkt->dts = AV_NOPTS_VALUE;
|
||||
|
||||
@@ -1664,6 +1686,7 @@ void ff_read_frame_flush(AVFormatContext *s)
|
||||
st->parser = NULL;
|
||||
}
|
||||
st->last_IP_pts = AV_NOPTS_VALUE;
|
||||
st->last_dts_for_order_check = AV_NOPTS_VALUE;
|
||||
if (st->first_dts == AV_NOPTS_VALUE)
|
||||
st->cur_dts = RELATIVE_TS_BASE;
|
||||
else
|
||||
@@ -2488,6 +2511,7 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
|
||||
st = ic->streams[i];
|
||||
st->cur_dts = st->first_dts;
|
||||
st->last_IP_pts = AV_NOPTS_VALUE;
|
||||
st->last_dts_for_order_check = AV_NOPTS_VALUE;
|
||||
for (j = 0; j < MAX_REORDER_DELAY + 1; j++)
|
||||
st->pts_buffer[j] = AV_NOPTS_VALUE;
|
||||
}
|
||||
@@ -3623,6 +3647,7 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
|
||||
/* default pts setting is MPEG-like */
|
||||
avpriv_set_pts_info(st, 33, 1, 90000);
|
||||
st->last_IP_pts = AV_NOPTS_VALUE;
|
||||
st->last_dts_for_order_check = AV_NOPTS_VALUE;
|
||||
for (i = 0; i < MAX_REORDER_DELAY + 1; i++)
|
||||
st->pts_buffer[i] = AV_NOPTS_VALUE;
|
||||
|
||||
|
||||
@@ -1055,6 +1055,8 @@ static int handle_jpeg(enum AVPixelFormat *format)
|
||||
*format = AV_PIX_FMT_YUV440P;
|
||||
return 1;
|
||||
case AV_PIX_FMT_GRAY8:
|
||||
case AV_PIX_FMT_GRAY16LE:
|
||||
case AV_PIX_FMT_GRAY16BE:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#define LIBSWSCALE_VERSION_MAJOR 2
|
||||
#define LIBSWSCALE_VERSION_MINOR 5
|
||||
#define LIBSWSCALE_VERSION_MICRO 101
|
||||
#define LIBSWSCALE_VERSION_MICRO 102
|
||||
|
||||
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
||||
LIBSWSCALE_VERSION_MINOR, \
|
||||
|
||||
@@ -266,7 +266,8 @@ static void yuv2yuvX_sse3(const int16_t *filter, int filterSize,
|
||||
"jb 1b \n\t"\
|
||||
:: "g" (filter),
|
||||
"r" (dest-offset), "g" ((x86_reg)(dstW+offset)), "m" (offset)
|
||||
: "%"REG_d, "%"REG_S, "%"REG_c
|
||||
: XMM_CLOBBERS("%xmm0" , "%xmm1" , "%xmm2" , "%xmm3" , "%xmm4" , "%xmm5" , "%xmm7" ,)
|
||||
"%"REG_d, "%"REG_S, "%"REG_c
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 937ff1dd9f498b39f9e882316e371fbf
|
||||
gbrp9be c76ab5850c9bc72bbbf36caa6d1c5ac7
|
||||
gbrp9le 5ad363dc9570187ad3e3f2344fbb30cf
|
||||
gray 2ee2ea2340d0ecf2dfa6f90f87384799
|
||||
gray16be 389f4e5a8ab413b3af32767b59ed7f9e
|
||||
gray16le a1f912941247e45b394b9cf4f0e81130
|
||||
gray16be a61507aec1088f5692036e1aabdb4f41
|
||||
gray16le 171fbdd46e3737bc865d0185a0006e1c
|
||||
monob 309b5785a36bd988d17e15d88f4ffad1
|
||||
monow 8809a02bc69b58d1114b09ca79ebffad
|
||||
nv12 75e90c54d858b993e99f4ee6d2a2a38f
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 937ff1dd9f498b39f9e882316e371fbf
|
||||
gbrp9be c76ab5850c9bc72bbbf36caa6d1c5ac7
|
||||
gbrp9le 5ad363dc9570187ad3e3f2344fbb30cf
|
||||
gray 2ee2ea2340d0ecf2dfa6f90f87384799
|
||||
gray16be 389f4e5a8ab413b3af32767b59ed7f9e
|
||||
gray16le a1f912941247e45b394b9cf4f0e81130
|
||||
gray16be a61507aec1088f5692036e1aabdb4f41
|
||||
gray16le 171fbdd46e3737bc865d0185a0006e1c
|
||||
monob 309b5785a36bd988d17e15d88f4ffad1
|
||||
monow 8809a02bc69b58d1114b09ca79ebffad
|
||||
nv12 75e90c54d858b993e99f4ee6d2a2a38f
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le d1465f7280f35aa0a70709e5a7bee1a4
|
||||
gbrp9be f17b7ba66ba35ed0fcbbb5c32c7e0f56
|
||||
gbrp9le fc11219debfbe8dd8c3d6f0ef92c4d50
|
||||
gray 6d34024704f862c75db3ba6989a4a039
|
||||
gray16be 02ac848ad4e28c06938599563ba81ff7
|
||||
gray16le 672aebfeb8a0f4067b3c6064340056e4
|
||||
gray16be 27cfdb4b211cad34f66a664cabd754b4
|
||||
gray16le 91cb081d457100a60c2d0f54110f064f
|
||||
nv12 923a313a7013fb0e87608155ef6aa9a4
|
||||
nv21 21e6b9273bb74203beabeb9edb9cf95c
|
||||
pal8 e1fd50b8a8a67fb5abd8b44abc778bbb
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 775b50257b848007c4ef3441ba772db1
|
||||
gbrp9be c293422f1395bfddc788282eef139ed6
|
||||
gbrp9le 0d2bb77c25d84611ec6222f3dffe11c0
|
||||
gray 42a0ad7625a0481183e375e38679d8d3
|
||||
gray16be a447af6482b922c9997ac02e5d3535f1
|
||||
gray16le c1dd0db327295898ff282d07f48c105d
|
||||
gray16be e10bc0a8b015fdb0776eca402ffe5eff
|
||||
gray16le 2eb159fb4af25c3b4f033e6414fef63e
|
||||
monob 1b7fb7e69a913a0a1c0dffc54e5899ea
|
||||
monow b5d3778a054fc73d515d36f8a6bc693b
|
||||
nv12 b3829e9ae2a15349432b7efac4236068
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 7baa94cd296e6ec8e41446bca95151e4
|
||||
gbrp9be a6eb7cde03f19a25bf13627d731a2c9a
|
||||
gbrp9le 1b6d228b97a370ec76707ed2dcc15a66
|
||||
gray 3258910ef8c6f0c4a331368e7af87507
|
||||
gray16be 50cc8a29e8e81e174676542347804a4f
|
||||
gray16le fb93e8aa2deed734dfd1ca6a5c48cf18
|
||||
gray16be 9a4c7e731ce572ad86985b56a653b5c3
|
||||
gray16le d10df57cf0de14206c8e354e8f6b732b
|
||||
rgb0 5f8f8076e2b9a2422cac25a4f0459d79
|
||||
rgb24 66ca89ced3ade4c239ad6c5a79a6b8cd
|
||||
rgb444be 7197a09137ab5630a26226396bb7e313
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 297e71281660b905711330a86eca8a71
|
||||
gbrp9be 8268b9a1e9f4d6a42e57db9c81d82fa5
|
||||
gbrp9le b3a09bba825e16e6d160328706a9f62f
|
||||
gray aaa9c2fe3c2a2a43a4b35226ea689b3c
|
||||
gray16be d206a080739d89cb7dc0009ad4082ed4
|
||||
gray16le 7ebcfd9401ba85e584230de8fc02986d
|
||||
gray16be 5be35a44f0ba85eb8c55b4f062fdb80f
|
||||
gray16le d9e73f7c4f53d795192ab87649270241
|
||||
nv12 719adbc47fa74e92f83150921917483f
|
||||
nv21 9c833b3ce53539d270e1f21e4319797b
|
||||
pal8 19c8735b23feeed18ec2d37913a5f3f8
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 778c97b5ed06b9f1a230840a15771bac
|
||||
gbrp9be b9fc10ab1ddad0e7945d6b047725d078
|
||||
gbrp9le ef3d6bc8069b95cae31100908a7fa967
|
||||
gray 2cadbaed81ee12181bda9f4aa87ddbc0
|
||||
gray16be cd9c1367dabd2f1858ae4f31693e622f
|
||||
gray16le 4ef774c282280d7ed4780690df6e5cb4
|
||||
gray16be 34cd1af8bbdd4266d5f7985ef22cfc9f
|
||||
gray16le 0eec98b32e4a2a57d9f51aac9ac3cf8d
|
||||
monob 07cffe7f5f25f39c3aa38866303791c6
|
||||
monow f2d1bdb939813a49abd6348ecfbb2703
|
||||
nv12 6847b3f7141ca1e3c40d3a494f0e13cb
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 937ff1dd9f498b39f9e882316e371fbf
|
||||
gbrp9be c76ab5850c9bc72bbbf36caa6d1c5ac7
|
||||
gbrp9le 5ad363dc9570187ad3e3f2344fbb30cf
|
||||
gray 2ee2ea2340d0ecf2dfa6f90f87384799
|
||||
gray16be 389f4e5a8ab413b3af32767b59ed7f9e
|
||||
gray16le a1f912941247e45b394b9cf4f0e81130
|
||||
gray16be a61507aec1088f5692036e1aabdb4f41
|
||||
gray16le 171fbdd46e3737bc865d0185a0006e1c
|
||||
monob 309b5785a36bd988d17e15d88f4ffad1
|
||||
monow 8809a02bc69b58d1114b09ca79ebffad
|
||||
nv12 75e90c54d858b993e99f4ee6d2a2a38f
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le eb6cb4555edb175d807fe1b5382d2fc7
|
||||
gbrp9be 2c9adb80abc16546cac69b4872aaf557
|
||||
gbrp9le fcfa1684553e3e185179462bca347649
|
||||
gray c45dcee08887f43dc463f79d7ecd7d68
|
||||
gray16be 70064f9acdc5e3935ccda67e765bf2fb
|
||||
gray16le 578241fb43029e5ae841a3c94d940dce
|
||||
gray16be 52a6ff8ba7fe11032f370c0888d87fc4
|
||||
gray16le e78f07e83698651639743f2f8501c51c
|
||||
monob 91ec2a25b13f6ca34d42da778b217de0
|
||||
monow a991455fda8f60f373aeb744456996b9
|
||||
nv12 0617f1e13ae4a43d4cb49282b9c02f71
|
||||
|
||||
@@ -26,8 +26,8 @@ gbrp14le 48b4273ff29b6b68a05a6027254ff75e
|
||||
gbrp9be b4361a1ad66cdff0d32d4af769a8a960
|
||||
gbrp9le 5bc148ca18ff1bf7095e78a4e65ed8ab
|
||||
gray 800813149a825964025e75cf14ec528b
|
||||
gray16be 9b23f3e79c54a6ccb62e0135a32e3045
|
||||
gray16le 93cfa8fbb2a86ead275ce1817444e6d5
|
||||
gray16be 03fdfc40a4fd25252f1b03d9358f00ef
|
||||
gray16le ebcd797559fef441e5baeff4e7a02472
|
||||
monob c395a8efb9477b4ec53a77326e41ccd7
|
||||
monow efaee1c763ccd5ce1a8519d2ed5aa5a9
|
||||
nv12 77373304a9c732b65dab0a33afba9295
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@
|
||||
35cb9e42b2d3181be494f8693af1ddea *./tests/data/images/pam/02.pam
|
||||
./tests/data/images/pam/%02d.pam CRC=0x0ff205be
|
||||
101445 ./tests/data/images/pam/02.pam
|
||||
ebd43e97839b2538a79f35757e84ffb0 *./tests/data/images/pam/02.pam
|
||||
./tests/data/images/pam/%02d.pam CRC=0x831a2963
|
||||
740eb42157af9e9eed46b70ba6a6cf4d *./tests/data/images/pam/02.pam
|
||||
./tests/data/images/pam/%02d.pam CRC=0x893f10ef
|
||||
202823 ./tests/data/images/pam/02.pam
|
||||
032538f0313b4f240b44a5bef115f5bf *./tests/data/images/pam/02.pam
|
||||
./tests/data/images/pam/%02d.pam CRC=0x5984c023
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
2af72da4468e61a37c220b25cb28618a *./tests/data/images/png/02.png
|
||||
./tests/data/images/png/%02d.png CRC=0x6da01946
|
||||
248633 ./tests/data/images/png/02.png
|
||||
62b26c9582ba37dd37b76191338f3770 *./tests/data/images/png/02.png
|
||||
./tests/data/images/png/%02d.png CRC=0x831a2963
|
||||
41687 ./tests/data/images/png/02.png
|
||||
6cf54c13aa407b77547cf6dfe23ecba3 *./tests/data/images/png/02.png
|
||||
./tests/data/images/png/%02d.png CRC=0x893f10ef
|
||||
47365 ./tests/data/images/png/02.png
|
||||
b4e38244c97debe3f528e7d1adb283ef *./tests/data/images/png/02.png
|
||||
./tests/data/images/png/%02d.png CRC=0x5984c023
|
||||
511900 ./tests/data/images/png/02.png
|
||||
|
||||
Reference in New Issue
Block a user