mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit 'b85a5e87af4254b80913fe33591d96361f30832b'
* commit 'b85a5e87af4254b80913fe33591d96361f30832b': lavu: Add av_strnstr() h264: Allow discarding the cropping information from SPS Conflicts: Changelog doc/APIchanges libavcodec/avcodec.h libavcodec/version.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
25be63005f
@ -9,6 +9,7 @@ version <next>:
|
||||
- Theora Midstream reconfiguration support
|
||||
- EVRC decoder
|
||||
- audio fade filter
|
||||
- av_strnstr
|
||||
|
||||
|
||||
version 1.1:
|
||||
|
@ -135,6 +135,9 @@ API changes, most recent first:
|
||||
2012-03-26 - a67d9cf - lavfi 2.66.100
|
||||
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
||||
|
||||
2013-01-xx - xxxxxxx - lavu 52.6.0 - avstring.h
|
||||
Add av_strnstr()
|
||||
|
||||
2013-01-xx - xxxxxxx - lavu 52.5.0 - hmac.h
|
||||
Add AVHMAC.
|
||||
|
||||
|
@ -713,6 +713,8 @@ typedef struct RcOverride{
|
||||
#define CODEC_FLAG2_NO_OUTPUT 0x00000004 ///< Skip bitstream encoding.
|
||||
#define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< Place global headers at every keyframe instead of in extradata.
|
||||
#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format. DEPRECATED!!!!
|
||||
#define CODEC_FLAG2_IGNORE_CROP 0x00010000 ///< Discard cropping information from SPS.
|
||||
|
||||
#if FF_API_MPV_GLOBAL_OPTS
|
||||
#define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp.
|
||||
#define CODEC_FLAG_QP_RD 0x08000000 ///< Use rate distortion optimization for qp selectioon.
|
||||
|
@ -471,6 +471,20 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
sps->crop_right = get_ue_golomb(&s->gb);
|
||||
sps->crop_top = get_ue_golomb(&s->gb);
|
||||
sps->crop_bottom= get_ue_golomb(&s->gb);
|
||||
if (h->s.avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) {
|
||||
av_log(h->s.avctx, AV_LOG_DEBUG,
|
||||
"discarding sps cropping, "
|
||||
"original values are l:%u r:%u t:%u b:%u\n",
|
||||
sps->crop_left,
|
||||
sps->crop_right,
|
||||
sps->crop_top,
|
||||
sps->crop_bottom);
|
||||
|
||||
sps->crop_left =
|
||||
sps->crop_right =
|
||||
sps->crop_top =
|
||||
sps->crop_bottom = 0;
|
||||
}
|
||||
if(sps->crop_left || sps->crop_top){
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ... (left: %d, top: %d)\n", sps->crop_left, sps->crop_top);
|
||||
}
|
||||
|
@ -79,6 +79,7 @@ static const AVOption options[]={
|
||||
{"sgop", "Deprecated, use mpegvideo private options instead", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_STRICT_GOP }, INT_MIN, INT_MAX, V|E, "flags2"},
|
||||
#endif
|
||||
{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"},
|
||||
{"ignorecrop", "ignore cropping information from sps", 1, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_IGNORE_CROP }, INT_MIN, INT_MAX, V|D, "flags2"},
|
||||
{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"},
|
||||
{"chunks", "Frame data might be split into multiple chunks", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_CHUNKS }, INT_MIN, INT_MAX, V|D, "flags2"},
|
||||
{"showall", "Show all frames before the first keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_SHOW_ALL }, INT_MIN, INT_MAX, V|D, "flags2"},
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "libavutil/avutil.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 54
|
||||
#define LIBAVCODEC_VERSION_MINOR 90
|
||||
#define LIBAVCODEC_VERSION_MINOR 91
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
|
@ -65,6 +65,20 @@ char *av_stristr(const char *s1, const char *s2)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *av_strnstr(const char *haystack, const char *needle, size_t hay_length)
|
||||
{
|
||||
size_t needle_len = strlen(needle);
|
||||
if (!needle_len)
|
||||
return haystack;
|
||||
while (hay_length >= needle_len) {
|
||||
hay_length--;
|
||||
if (!memcmp(haystack, needle, needle_len))
|
||||
return haystack;
|
||||
haystack++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t av_strlcpy(char *dst, const char *src, size_t size)
|
||||
{
|
||||
size_t len = 0;
|
||||
|
@ -66,6 +66,21 @@ int av_stristart(const char *str, const char *pfx, const char **ptr);
|
||||
*/
|
||||
char *av_stristr(const char *haystack, const char *needle);
|
||||
|
||||
/**
|
||||
* Locate the first occurrence of the string needle in the string haystack
|
||||
* where not more than hay_length characters are searched. A zero-length
|
||||
* string needle is considered to match at the start of haystack.
|
||||
*
|
||||
* This function is a length-limited version of the standard strstr().
|
||||
*
|
||||
* @param haystack string to search in
|
||||
* @param needle string to search for
|
||||
* @param hay_length length of string to search in
|
||||
* @return pointer to the located match within haystack
|
||||
* or a null pointer if no match
|
||||
*/
|
||||
char *av_strnstr(const char *haystack, const char *needle, size_t hay_length);
|
||||
|
||||
/**
|
||||
* Copy the string src to dst, but no more than size - 1 bytes, and
|
||||
* null-terminate dst.
|
||||
|
@ -75,8 +75,8 @@
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 52
|
||||
#define LIBAVUTIL_VERSION_MINOR 15
|
||||
#define LIBAVUTIL_VERSION_MICRO 103
|
||||
#define LIBAVUTIL_VERSION_MINOR 16
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
LIBAVUTIL_VERSION_MINOR, \
|
||||
|
Loading…
Reference in New Issue
Block a user